diff --git a/templates/player-details.php b/templates/player-details.php
index cf775c0e..c3120586 100644
--- a/templates/player-details.php
+++ b/templates/player-details.php
@@ -48,7 +48,9 @@ $data = array_merge( $metrics_before, $common, $metrics_after );
if ( $current_teams ):
$teams = array();
foreach ( $current_teams as $team ):
- $teams[] = '' . get_the_title( $team ) . '';
+ $team_name = get_the_title( $team );
+ if ( $link_teams ) $team_name = '' . $team_name . '';
+ $teams[] = $team_name;
endforeach;
$label = _n( 'Current Team', 'Current Teams', count( $teams ), 'sportspress' );
$data[ $label ] = implode( ', ', $teams );
@@ -57,7 +59,9 @@ endif;
if ( $past_teams ):
$teams = array();
foreach ( $past_teams as $team ):
- $teams[] = '' . get_the_title( $team ) . '';
+ $team_name = get_the_title( $team );
+ if ( $link_teams ) $team_name = '' . $team_name . '';
+ $teams[] = $team_name;
endforeach;
$data[ __( 'Past Teams', 'sportspress' ) ] = implode( ', ', $teams );
endif;