diff --git a/templates/player-statistics.php b/templates/player-statistics.php index d48f0e1b..837a472d 100644 --- a/templates/player-statistics.php +++ b/templates/player-statistics.php @@ -38,13 +38,15 @@ if ( is_array( $leagues ) ): foreach ( $section_order as $section_id => $section_label ) { if ( -1 !== $section_id && ! in_array( $section_id, $player_sections ) ) continue; + if ( sizeof( $leagues ) > 1 ) { + printf( '

%s

', $section_label ); + } + foreach ( $leagues as $league ): $caption = $league->name; if ( null !== $section_label ) { - if ( sizeof( $leagues ) > 1 ) { - printf( '

%s

', $section_label ); - } else { + if ( sizeof( $leagues ) === 1 ) { $caption = $section_label; } }