From be6a0bd746a3b9556c95a00dc9e6ff5121589c14 Mon Sep 17 00:00:00 2001 From: roberto Date: Fri, 21 Jun 2024 21:59:49 +0200 Subject: [PATCH] fix duplicate tax_query arg --- includes/Classes/Helper.php | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/includes/Classes/Helper.php b/includes/Classes/Helper.php index f824fe5b7..db7f49d9d 100644 --- a/includes/Classes/Helper.php +++ b/includes/Classes/Helper.php @@ -738,12 +738,8 @@ public static function get_dynamic_args(array $settings, array $args) ]; } - if ( isset($data->taxonomy) ) { - $args[ 'tax_query' ][] = [ - 'taxonomy' => $data->taxonomy, - 'field' => 'term_id', - 'terms' => $data->term_id, - ]; + if ( isset($wp_query->tax_query) ) { + $args[ 'tax_query' ][] = $wp_query->tax_query->queries; } if (get_query_var('author') > 0) {