This is really confusing me.
I’ve tried numerous things but cannot get appropriate results.
Here’s what I currently have for my query:
$ args = array( 'post_type' => 'product', 'tax_query' => array( 'relation' => 'AND', array( 'taxonomy' => 'product_cat', 'field' => 'slug', 'terms' => array( 'ring' ), ), array( 'taxonomy' => 'product_tag', 'field' => 'slug', 'terms' => array( 'black', 'men' ), ), ), ); $ query = new WP_Query( $ args );
As you can see I am trying to return products in the product category
ring that contain both the tags
It appears though the
terms array which includes
men, is returning posts that include the tag
black OR the tag
men in the
How do I get it so that only products that include BOTH the tags in the query are returned?
Thanks so much