not tested but give this a shot
'tax_query' => array(
'relation' => 'AND',
array(
'taxonomy' => 'image_tag',
'field' => 'term_id',
'terms' => 25,
'operator' => 'IN',
),
array(
'taxonomy' => 'image_tag',
'field' => 'term_id',
'terms' => 41,
'operator' => 'IN',
)
),
OR
'tax_query' => array(
'relation' => 'AND',
array(
'taxonomy' => 'image_tag',
'field' => 'term_id',
'terms' => array(25,41),
'operator' => 'IN',
),
),
Related Posts:
- Querying by taxonomy vs Querying by Custom fields Speed Comparison
- tax_query shows no results if nothing is selected
- WP_Query, tax_query and term_meta: How to?
- Querying on multiple taxonomies pulled from $_GET checkbox array not working?
- Tax Query only returns for the first of several terms
- How to print term name inside wp post loop
- How to restrict search on a certain page to only return results against custom taxonomies?
- list all post who have mutual taxonomy as current taxonomy!
- Optimal way to make tags in tax_query optional?
- How can I get all the posts that are related with a specific taxonomy term?
- How to combine nested tax_query logic with other nested query logic?
- tax_query not working for taxonomy slug
- Custom query for tag and custom tag from 2 post type
- How to get hierarchical number of custom taxanomy
- Nested meta_query with multiple relation keys
- “tax_query” parameter not working with WP_Query
- Escaping WP_Query tax_query when term has special character(s)
- Including all terms in wordpress tax_query
- Tax_query terms ID’s using variable
- The Operator “NOT IN” Does Not Work In tax_query
- Why is my WP_Query not working when tax_query terms are an array?
- Custom archive page based on array of categories and tags
- Sorting a list of posts displayed under a list of associated terms (which should be sorted without initial articles)
- How to extend tag and category “Related Posts” query to custom post_type if the first 2 terms have no posts
- Find all product that contain terms with %keywords% in WP_Query
- Get term by custom term meta and taxonomy
- How to Modify Taxonomy Archive Page with Search Parameter?
- Get array of current post term ID’s
- How to add terms to my tax_query based off of the current post
- Query all posts in a given taxonomy
- Change default ordering of taxonomy terms – pre_get_terms
- Is it possible to dynamically get queried term AND taxonomy?
- How can i simulate “taxonomy__in” in query?
- Get list of terms that have posts in another term
- pre_get_posts Remove tax_query Completely
- Meta Query relation “AND” not working
- Getting Taxonomy inside WP_Query Loop
- Nested tax_query that allows specified categories OR tags, but NOT other categories
- Order posts by taxonomy count
- Populate tax_query terms parameter with post term
- Fastest way of counting posts of a custom post type in a specific taxonomy term?
- Is it a good idea to improve meta query performance by adding tax query?
- WP_Query | Tax_Query Relation | Unable to use ‘OR’ as it then allows all products, help me finish my query?
- Tax query AND/OR meta query [duplicate]
- How do I exclude the lowest level terms in a taxonomy?
- WordPress query with items from more than one selfdefined taxonomy as `term` argument
- How to display an other custom post type in a different custom post type’s archive?
- wp_query args adding muitiple tax_querys
- Hiding taxonomies with no children WP_Query & tax_query
- How to display Related Posts based on number of taxonomy terms matched
- find posts that don’t have a custom taxonomy
- tax_query not working in template
- Finding WordPress Posts assigned to multiple categories
- get all posts associated with a custom taxonomy
- How to set an alternate posts_per_page value for default queries in different templates
- WP_query – Filter by tax_query and meta_query using multiple select
- WP_Query parameter conflict
- How to do a particular wp_query taxonomy search
- How to add custom meta to ‘pre_get_terms’?
- Can’t fetch Custom Post Type Data through Custom Query
- WP Job Manager plugin – Listing only the twelve job categories on frontpage order by jobs they have
- One WP_Query that always shows 1 post from category X and 1 post from “not in category X”?
- Get posts in taxonomy randomly
- Loop posts based on permalink term
- tax_query (if the terms are empty)
- How to get posts by category and by choosing a taxonomy term?
- Function using get_posts() with tax_query not working when called from functions.php
- WP_Query tax_query – Show results if child has parent X
- how to use tax_query to apply both terms or one if one is empty
- Show multiple tax_query from 2 or more post_type in a single code
- Any quicker alternative for WP_Query “NOT IN”
- Tax Query on product_cat using NOT IN as operator does not exclude that category
- Why is my pagination /page/2 taking me to index.php?
- custom post type and a “sticky” position taxonomy
- Filter for each loop when WP_Query has no posts to show
- WP_Query for a taxonomy value OR a custom post type meta field
- How do I stop the same post showing multiple times in a archive?
- wp_query with meta_query and tax_query
- Related categories order posts by category
- WordPress – Form does not filter the results of taxonomies
- Select multiple categories with is_tax
- WP Query for all events prior to current date
- Why pagination is not working with tax_query param?
- Show one post of each custom taxonomy
- Query child posts with tax query on parents
- Displaying posts from sub taxonomies only
- Taxonomy archive, categorised by other taxonomy, not hiding empty taxonomies
- WP Query tax_query not returning posts
- My entry results are not consistently alphabetized
- I cannot get tax_query in get_posts() to work with custom taxonomy
- In Product Category archives how to show Posts having same/similar prod_cat slug structure?
- Custom loop – Isolating post meta output depending on current query taxonomy terms
- List posts of terms but exclude one term
- Hiding all posts/products/pages from a site based on a custom taxonomy/domain name
- WordPress hiding posts without content on custom taxonomy query. How to solve?
- Output ACF field dynamicaly within a taxonomy loop [closed]
- Custom query for certain post type OR another post type with a certain category
- WP Query Conditionally query meta and taxonomy
- Custom Taxonomy in custom REST API search
- taxonomy-{term}.php terms pagination returning 404 after a certain page