The solution: Add ‘operator’ => ‘AND’, to the tax_query.
'tax_query' => array(
'relation' => 'OR',
array(
'taxonomy' => 'offer',
'field' => 'slug',
'terms' => array($offer),
'operator' => 'AND',
),
array(
'taxonomy' => 'network',
'field' => 'slug',
'terms' => array($network),
'operator' => 'AND',
),
Related Posts:
- relation OR instead of AND – Filtered term ID’s in loop
- WordPress – Form does not filter the results of taxonomies
- Use REGEXP in WP_Query meta_query key
- Whats the difference between post_limits and pre_get_posts?
- WP query taxonomy input differs to output?
- How to add taxonomy filter on the query fly?
- Search custom taxonomy term by name
- How to display post from current Taxonomy in archive page?
- Changing Posts Per Page and offset with pre_get_posts
- Ignore a filter on the media library
- Filter and list posts of a custom taxonomy
- Which filter/action hook gets triggered after a query has been performed?
- Remove ellipsis from the excerpt retrieved using get_the_excerpt()
- Removing posts from the returned wp_query. Cannot use object of type WP_Query as array
- Filtering posts by custom field value not working
- Display link to taxonomy archive only if it has posts with certain custom field values
- Use ‘parse_query’ filter to show posts that from multiple criteria
- What is considered a default query for the request filter?
- Pass array of taxonomy terms to wp_query
- Using apply_filters(‘the_content’, $custom_query->post_content) alters output
- Modifying the Search Results
- Formulate a url to show posts with both taxonomy terms
- Query total number of posts
- How to add post_distinct filter to WP_Comment_Query?
- Taxonomy search/filter with multiple taxonomies and multiple taxonomy terms
- Order by slug in get_terms with multiple taxonomies
- Output an array of terms for a ‘tax_query’ => array()
- Function get_queried_object() return NULL in custom taxonomy
- Using Ajax to load more posts | Help me change the wording on my button to notify the user
- WP_Query Not Recognizing Taxonomy Parameter in Custom Search
- Return Taxonomy/Term Information with Posts (WP_Query/get_posts)
- is_tax() function not working as expected
- Advanced Taxonomy Queries WordPress
- Order by title without taking into account ‘the’
- How to filter, restrict and return posts based on custom user meta information
- WP_Query tax query part of slug
- Taxonomy Query Relation field not behaving correctly?
- Filter posts in category archive page by year using a dropdown
- Applying posts_clauses filter to specific queries only
- Add class to first post in custom loop using post_class filter
- Post loop for all taxonomy terms
- Add posts to WP Query object
- Taxonomy and Date in same query?
- how to access query string in wordpress?
- Taxonomy order exception for specific term
- Filter Custom Taxonomy Posts
- Include posts from some categories while excluding from others
- Using custom taxonomies in a query
- Filter post query to only show direct children of category
- How to make posts unqueryable/unpublish posts where ACF relationship field is an unpublished post? [closed]
- Get Child Category only
- Change AJAX filter from POST to GET for URL Parameters
- Using post_where filter only on main query NOT sidebard new WP_Query
- Filtering posts by archive showing all years
- WP_Query – How to get all posts of specific days of week by custom field date?
- How to echo woocommerce category name
- Multiple wp_query on archive page
- Retrieve select tag custom values from array and display them in current page with wp_query?
- How to use a dropdown to filter posts by custom field
- Remove post type filter added by the plugin in the final query
- WP Query – filtering terms with regex
- How to get posts by category and by choosing a taxonomy term?
- Can’t order the query result as given posts id’s array
- filter posts by meta key with pagination
- Why does apply_filters behave different inside and outside a loop?
- get_the_terms has strange result since version 6.0
- Can’t get term id for category archive
- Filter sub-category from checkbox form
- Exclude post with taxonomy and from the terms (taxonomy & tag) posts count
- Use get_cat_ID to retreive multiple category IDs
- My combination of ‘post_type’ and ‘tax_query’ not working?
- How to add a “base” filter for all posts visible to visitors on the site?
- WP Query should show No Posts when tax_query $args taxonomies don’t have associated posts
- tax_query not working on custom post type
- Save queried result into database
- WooCommerce WP_Query using tax_query returns no results (0 = 1)
- WP_Query paginate with one term per page?
- Show one post of each custom taxonomy
- Query Posts | Combining multiple form inputs into query arguments to generate one filter result
- Sorting query_posts() with a complex orderby filter
- WP Query filters active on wrong query
- Gather same custom field values in one value in a select tag with wp_query
- Taxonomy Terms That Don’t Exist Display Results
- WP_Query doesn’t works inside loop
- Track write actions to the database
- How can I get all the posts that are related with a specific taxonomy term?
- Fetch only categorized posts
- Custom taxonomy and query multi conditions
- WP Query with sticky posts and tax_query
- Empty ‘terms’ in ‘tax_query’ returns an empty array
- Add filter to Orderby Parameter using Array
- Get the tax term in which is a post via wp_query
- query post based on comparison
- Do not show a custom post if it belongs to a certain custom taxonomy
- wp_query->set for several categories
- Adding arguments to WooCommerce Product Loop using AJAX
- tax_query not working properly with get_posts
- Woocommerce set loop_shop_columns to be 3 in the main shop page loop only and 4 otherwise
- List categories using WP_Query
- How can I get taxonomy term name using term slug & post ID using build in WordPress function or class?