diff --git a/includes/sp-template-hooks.php b/includes/sp-template-hooks.php
index ccd2eaf1..56ec17be 100644
--- a/includes/sp-template-hooks.php
+++ b/includes/sp-template-hooks.php
@@ -123,14 +123,16 @@ function sportspress_the_title( $title, $id = null ) {
$teams = get_post_meta( $id, 'sp_team' );
$teams = array_filter( $teams );
if ( $teams ):
- $title .= '
';
- $delimiter = get_option( 'sportspress_event_teams_delimiter', 'vs' );
$team_logos = array();
foreach ( $teams as $team ):
$team_logos[] = get_the_post_thumbnail( $team, 'sportspress-fit-icon' );
endforeach;
- $title .= implode( ' ' . $delimiter . ' ', $team_logos );
- $title .= '
';
+ if ( ! empty( array_filter( $team_logos ) ) ):
+ $title .= '';
+ $delimiter = get_option( 'sportspress_event_teams_delimiter', 'vs' );
+ $title .= implode( ' ' . $delimiter . ' ', $team_logos );
+ $title .= '
';
+ endif;
endif;
endif;
endif;