Display team logos under event title

This commit is contained in:
Brian Miyaji
2014-05-16 20:00:12 +10:00
parent d358f9a883
commit 4ec64cd5ee
4 changed files with 18 additions and 2 deletions

View File

@@ -98,6 +98,15 @@ function sportspress_the_title( $title, $id ) {
if ( $role != null ):
$title = '<strong>' . $role . '</strong> ' . $title;
endif;
elseif ( is_singular( 'sp_event' ) && get_option( 'sportspress_event_show_logos', 'yes' ) == 'yes' ):
$teams = get_post_meta( $id, 'sp_team' );
if ( $teams ):
$title .= '<div class="sp-event-teams">';
foreach ( $teams as $team ):
$title .= get_the_post_thumbnail( $team, 'sportspress-fit-icon' ) . ' ';
endforeach;
$title .= '</div>';
endif;
endif;
endif;
return $title;