Check if teams exist in countdown

This commit is contained in:
Brian Miyaji
2015-09-20 21:58:44 +10:00
parent 866ede23f1
commit 6feec3b38e

View File

@@ -46,6 +46,7 @@ if ( $link_events ) $title = '<a href="' . get_post_permalink( $post->ID, false,
$teams = array_unique( get_post_meta( $post->ID, 'sp_team' ) ); $teams = array_unique( get_post_meta( $post->ID, 'sp_team' ) );
$i = 0; $i = 0;
if ( is_array( $teams ) ) {
foreach ( $teams as $team ) { foreach ( $teams as $team ) {
$i++; $i++;
if ( has_post_thumbnail ( $team ) ) { if ( has_post_thumbnail ( $team ) ) {
@@ -57,6 +58,7 @@ if ( $link_events ) $title = '<a href="' . get_post_permalink( $post->ID, false,
} }
} }
} }
}
?> ?>
<?php echo $title; ?> <?php echo $title; ?>
</h3> </h3>