From 6a7f4d1d9f95e26ac50877b9bab37ed610ff9913 Mon Sep 17 00:00:00 2001 From: Brian Miyaji Date: Sun, 16 Mar 2014 14:18:55 +1100 Subject: [PATCH] Use only league events in table --- functions.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/functions.php b/functions.php index cd18a25a..ce17d01b 100644 --- a/functions.php +++ b/functions.php @@ -1496,9 +1496,14 @@ if ( !function_exists( 'sportspress_get_team_columns_data' ) ) { 'posts_per_page' => -1, 'order' => 'ASC', 'meta_query' => array( + 'relation' => 'AND', array( 'key' => 'sp_team', 'value' => $post_id + ), + array( + 'key' => 'sp_format', + 'value' => 'league' ) ), 'tax_query' => array( @@ -1512,7 +1517,7 @@ if ( !function_exists( 'sportspress_get_team_columns_data' ) ) { 'taxonomy' => 'sp_season', 'field' => 'id', 'terms' => $div_id - ) + ), ) ); $events = get_posts( $args );