Aleš Sýkora / November 28, 2023 / 1 comments

Oxygen Taxonomy Query multiple taxonomies and terms

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.

  1. Add tax_query
  2. Add relation AND | OR
  3. 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:

Two taxonomy query example in Oxygen builder
Woocommerce featured product query example

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. 🍻

1 comments

Share Your Thoughts