Add events to team pages

This commit is contained in:
Brian Miyaji
2016-04-08 15:26:59 +10:00
parent 36bc9bc622
commit 35ed9962d4
12 changed files with 227 additions and 38 deletions

19
templates/team-events.php Normal file
View File

@@ -0,0 +1,19 @@
<?php
/**
* Team Events
*
* @author ThemeBoy
* @package SportsPress/Templates
* @version 2.0
*/
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
if ( ! isset( $id ) )
$id = get_the_ID();
$format = get_option( 'sportspress_team_events_format', 'blocks' );
if ( 'calendar' === $format )
sp_get_template( 'event-calendar.php', array( 'team' => $id ) );
else
sp_get_template( 'event-fixtures-results.php', array( 'team' => $id ) );