Check if teams exist in countdown
This commit is contained in:
@@ -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>
|
||||||
|
|||||||
Reference in New Issue
Block a user