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
- Adding a language rule and displaying posts with a custom taxonomy term on its archive page
- Nested meta_query with multiple relation keys
- “tax_query” parameter not working with WP_Query
- Multiple relationship for multiple tax_query in WP_Query
- Custom taxonomy query broken after upgrade to 4.4
- Show posts without term
- Custom Taxonomy and Tax_Query
- Conditional arguments for WP_Query and tax_query depending on if $somevar has a value
- How to add taxonomy filter on the query fly?
- Escaping WP_Query tax_query when term has special character(s)
- Does tax_query really beats meta_query in all situations?
- Including all terms in wordpress tax_query
- Tax_query terms ID’s using variable
- The Operator “NOT IN” Does Not Work In tax_query
- Display posts the match taxonomy term linked from wp_list_categoies?
- Query two taxonomies via URL or link?
- Why is my WP_Query not working when tax_query terms are an array?
- Using tax_query creates a 1 = 0 or 1 = 1 in $wp_query->request
- Counting number of posts with Category B in Category A
- search query within custom taxonomy term, post title and meta field
- Custom archive page based on array of categories and tags
- if wp_query taxonomy term have posts
- Select posts wich has no relationship in custom taxonomy
- Sorting a list of posts displayed under a list of associated terms (which should be sorted without initial articles)
- WooCommerce: filter by parent product’s taxonomy and product variation’s meta data
- How to combine tax_query and date_query in WordPress
- List taxonomy terms plus their latest post ordered by post date
- How to extend tag and category “Related Posts” query to custom post_type if the first 2 terms have no posts
- Using tax_query reverses my post_type argument in a custom WP_Query
- WP Query for Posts (Products) in Specific Category that has 2 Specific Tags (*AND* both tags not *OR*)
- Find all product that contain terms with %keywords% in WP_Query
- Get term by custom term meta and taxonomy
- Filter and list posts of a custom taxonomy
- why do drafts return as part of wp_query?
- How to show only one post for each categories of taxonomy of custom post that contains a specific custom field
- WP_Tax_Query with post_tag not working
- get complex results set according to category structure
- How to Modify Taxonomy Archive Page with Search Parameter?
- Get array of current post term ID’s
- WP_Query tax_query problem
- How to add terms to my tax_query based off of the current post
- Setup of taxonomy term template pages
- Query all posts in a given taxonomy
- Change default ordering of taxonomy terms – pre_get_terms
- Display link to taxonomy archive only if it has posts with certain custom field values
- tax_query OR with empty result returns all posts
- How to do a query on custom taxonomies that is uncategorised?
- Order taxonomy terms in alphabetical order
- Is it possible to dynamically get queried term AND taxonomy?
- Empty tax_query array returns an empty array
- How can i simulate “taxonomy__in” in query?
- Query Custom Post Type Order By Taxonomy Field
- Get list of terms that have posts in another term
- pre_get_posts Remove tax_query Completely
- Query post from all category with same tag on 1 pages
- tax_query: Order by slug?
- Query with custom taxonomy not working
- Meta Query relation “AND” not working
- Tax query clause inside a meta query clause?
- Function get_queried_object() return NULL in custom taxonomy
- Getting Taxonomy inside WP_Query Loop
- Nested tax_query that allows specified categories OR tags, but NOT other categories
- Order posts by taxonomy count
- showing all search result in one template
- List custom taxonomy terms sharing posts with a term from a second custom taxonomy
- Populate tax_query terms parameter with post term
- Query custom post type by custom taxonomy (category slug)
- How to Filter Posts by Custom Fields?
- Fastest way of counting posts of a custom post type in a specific taxonomy term?
- Fetch posts that match term slug first two letters (wp query)
- 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?
- WP_Query tax query part of slug
- Taxonomy Query Relation field not behaving correctly?
- Show posts from a custom taxonomy on a page
- WP_Query ignoring tax_query when is_singular
- Tax query AND/OR meta query [duplicate]
- How do I exclude the lowest level terms in a taxonomy?
- wp_query for multiple cities (multiple values in a metabox)
- WordPress query with items from more than one selfdefined taxonomy as `term` argument
- Query with relation and one without relation using multiple taxonomies?
- How to display an other custom post type in a different custom post type’s archive?
- Search form not working with custom query?
- Post loop for all taxonomy terms
- Display custom tags on pages that have a specific page parent
- wp_query args adding muitiple tax_querys