Aleš Sýkora / November 28, 2023 / 1 comments
Oxygen Taxonomy Query multiple taxonomies and terms
min read / WordPress / Share on: Twitter, LinkedIn, Facebook
Post summary: You can use tax query when using Oxygen advanced query builder. If you want to display posts in categories in multiple taxonomies, you need to set it up right. Add tax_queryAdd relation AND | ORAdd tax_query arrays When you do this in code, it will look like this: When using oxygen, you need to construct…
You can use tax query when using Oxygen advanced query builder. If you want to display posts in categories in multiple taxonomies, you need to set it up right.
- Add tax_query
- Add relation AND | OR
- Add tax_query arrays
When you do this in code, it will look like this:
'tax_query' => array(
'relation' => 'AND',
array(
'taxonomy' => 'category',
.....
),
array(
'taxonomy' => 'businessunit',
....
)
)
When using oxygen, you need to construct it like this:
Fuel my passion for writing with a beer🍺
Your support not only makes me drunk but also greatly motivates me to continue creating content that helps. Cheers to more discoveries and shared success. 🍻
Stéphane
Aleš Sýkora, thanks for this useful article.
Have a nice day
Stéphane