tax_query operator AND excludes children
-
Hi,
I just bump into this… bug? I need to run a query to bring posts belonging to multiple categories, they need to have each category selected, so the operator needs to be “AND”. The problem is, I also need to bring the posts that belong to any sub category of a category selected, and this operator is preventing that to happen, even with “include_children” set to true.
Does anyone know a workaround for this situation?
Here’s a sample of my arguments array:
[post_type] => product [posts_per_page] => 20 [paged] => 0 [tax_query] => Array ( [0] => Array ( [taxonomy] => category [terms] => Array ( [0] => 300 [1] => 594 ) [operator] => AND [include_children] => 1 ) ) [orderby] => name [order] => ASC
Thanks!
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘tax_query operator AND excludes children’ is closed to new replies.