From 957dec253765bae4ed5501dd3bd6ab916b985a32 Mon Sep 17 00:00:00 2001 From: Brian Miyaji Date: Sat, 17 May 2014 10:41:19 +1000 Subject: [PATCH] Fix event blocks results without logos --- templates/event-blocks.php | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/templates/event-blocks.php b/templates/event-blocks.php index b0ff8496..60f7f87e 100644 --- a/templates/event-blocks.php +++ b/templates/event-blocks.php @@ -55,15 +55,15 @@ if ( isset( $columns ) ) $j = 0; foreach( $teams as $team ): - if ( ! has_post_thumbnail ( $team ) ) - continue; $j++; - if ( $link_teams ): - $logo = '' . get_the_post_thumbnail( $team, 'sportspress-fit-icon', array( 'class' => 'team-logo logo-' . ( $j % 2 ? 'odd' : 'even' ) ) ) . ''; - else: - $logo = get_the_post_thumbnail( $team, 'sportspress-fit-icon', array( 'class' => 'team-logo logo-' . ( $j % 2 ? 'odd' : 'even' ) ) ); + if ( has_post_thumbnail ( $team ) ): + if ( $link_teams ): + $logo = '' . get_the_post_thumbnail( $team, 'sportspress-fit-icon', array( 'class' => 'team-logo logo-' . ( $j % 2 ? 'odd' : 'even' ) ) ) . ''; + else: + $logo = get_the_post_thumbnail( $team, 'sportspress-fit-icon', array( 'class' => 'team-logo logo-' . ( $j % 2 ? 'odd' : 'even' ) ) ); + endif; + $logos[] = $logo; endif; - $logos[] = $logo; $team_results = sp_array_value( $results, $team, null ); if ( $primary_result ):