Display total columns per team

This commit is contained in:
Brian Miyaji
2014-08-24 00:51:08 +10:00
parent c17e47fd38
commit 16ae2fea9c
5 changed files with 76 additions and 46 deletions

View File

@@ -95,18 +95,25 @@ class SP_League_Table extends SP_Custom_Post{
'order' => 'DESC',
'tax_query' => array(
'relation' => 'AND',
array(
'taxonomy' => 'sp_league',
'field' => 'id',
'terms' => $league_id
),
array(
'taxonomy' => 'sp_season',
'field' => 'id',
'terms' => $div_id
)
)
),
);
if ( $league_id ):
$args['tax_query'][] = array(
'taxonomy' => 'sp_league',
'field' => 'id',
'terms' => $league_id
);
endif;
if ( $league_id ):
$args['tax_query'][] = array(
'taxonomy' => 'sp_season',
'field' => 'id',
'terms' => $div_id
);
endif;
$events = get_posts( $args );
// Event loop