Add team gallery template

This commit is contained in:
Brian Miyaji
2017-06-06 15:22:33 +10:00
parent 18a417adf3
commit 2cb7a7528b
15 changed files with 334 additions and 29 deletions

View File

@@ -330,7 +330,12 @@ if ( ! function_exists( 'sportspress_output_league_table' ) ) {
* @return void
*/
function sportspress_output_league_table() {
sp_get_template( 'league-table.php' );
$id = get_the_ID();
$format = get_post_meta( $id, 'sp_format', true );
if ( array_key_exists( $format, SP()->formats->table ) && 'standings' !== $format )
sp_get_template( 'team-' . $format . '.php', array( 'id' => $id ) );
else
sp_get_template( 'league-table.php', array( 'id' => $id ) );
}
}