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
- 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
- ajax category filter
- Display posts the match taxonomy term linked from wp_list_categoies?
- Ignore a filter on the media library
- How to get any tag ID
- Filter and list posts of a custom taxonomy
- 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
- How to implement time filter to show random post 1 month for one category and 3 months for other categories
- Use ‘parse_query’ filter to show posts that from multiple criteria
- What is considered a default query for the request filter?
- How do I search inside specific taxonomies in WordPress
- 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
- 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
- How to use filter hook “the_posts” with a function that refers to $this?
- 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’
- Taxonomy Query Relation field not behaving correctly?
- Filter posts in category archive page by year using a dropdown
- Slow queries on a huge database
- Add class to first post in custom loop using post_class filter
- WP_Query with different postmeta filter for each categories
- Slow WP_Query with ‘OR’ on meta_query
- Add posts to WP Query object
- Taxonomy and Date in same query?
- Automatically Query Parent Taxonomy
- How can I allow sticky posts but cap the query to 1 post?
- 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
- Changing the default wp_search_stopwords
- Using custom taxonomies in a query
- Filter post query to only show direct children of category
- Get posts from multiple tax terms
- How to make posts unqueryable/unpublish posts where ACF relationship field is an unpublished post? [closed]
- 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
- Loop posts based on permalink term
- How to echo woocommerce category name
- 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
- Don’t repeat posts from children in parent taxonomy query
- filter posts by meta key with pagination
- Why does apply_filters behave different inside and outside a loop?
- Show multiple tax_query from 2 or more post_type in a single code
- get_the_terms has strange result since version 6.0
- Filter sub-category from checkbox form
- Exclude post with taxonomy and from the terms (taxonomy & tag) posts count
- My combination of ‘post_type’ and ‘tax_query’ not working?
- Strange behaviour of hierarchical taxonomy archive
- 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)
- 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
- How to break up output of posts for different terms on same page?
- Gather same custom field values in one value in a select tag with wp_query
- How to define a custom hierarchy for terms?
- Taxonomy Terms That Don’t Exist Display Results
- WP_Query doesn’t works inside loop
- 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
- List categories using WP_Query
- How can I get taxonomy term name using term slug & post ID using build in WordPress function or class?
- Using WP Query, I want to include all posts in category 1 as long as they are not also in category 2
- WP_Query filter Posts by timestamp event (range start and end) and by month (next 12 month)
- Include custom post type that matches taxonomy field in another custom post type
- Grab IDs of products from WP_Query which is run elsewhere
- Showing all posts of the current custom taxonomy on archive page