From a33f8a36ac1c49d6c70686152d1141b428830233 Mon Sep 17 00:00:00 2001 From: szk11001 Date: Mon, 9 Nov 2015 11:34:35 -0500 Subject: [PATCH] Fix for tags not working when breaking into groups --- user-people.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/user-people.php b/user-people.php index c13bd56..a0728c0 100644 --- a/user-people.php +++ b/user-people.php @@ -75,6 +75,7 @@ function createTextCell($setting, $field){ if ($specific_groups != false || $specific_tags != false){ $tax_query = array(); + $isTagSet = false; if ($specific_groups != false) { $group_query = array( @@ -85,6 +86,7 @@ function createTextCell($setting, $field){ array_push($tax_query, $group_query); } if ($specific_tags != false) { + $isTagSet = true; $tag_query = array( 'taxonomy' => 'persontag', 'field' => 'term_id', @@ -134,6 +136,9 @@ function createTextCell($setting, $field){ 'terms' => $value ); array_push($tax_query, $group_query); + if( $isTagSet != false ){ + array_push($tax_query, $tag_query); + } $args['tax_query'] = $tax_query; // with $arg updated, let's do a new query.