WP_Query only returns posts that match first term in tax_query array
-
Hi!
I had the same problem described here and I found the real solution.
The problem is if you put multiple terms for one taxonomy, you need to add “relation = OR” to the query:
Array ( [post_type] => Array ( [0] => event ) [post_status] => publish [posts_per_page] => -1 [orderby] => title [order] => ASC [tax_query] => Array ( [relation] => OR [0] => Array ( [taxonomy] => event-type [field] => slug [operator] => IN [terms] => Array ( [0] => walk [1] => talk [2] => workshop ) ) ) )
The page I need help with: [log in to see the link]
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘WP_Query only returns posts that match first term in tax_query array’ is closed to new replies.