When you inspect your SQL query right after you executed it
$GLOBALS['wp_query']->last_query
you will see that the SQL statement is asking for AND
. Jump into the posts_where
or the the posts_clauses
filter (where you need to look up the where
keys value) and alter it to OR
.
Related Posts:
- Why is my WP_Query not working when tax_query terms are an array?
- How to add terms to my tax_query based off of the current post
- Is it possible to dynamically get queried term AND taxonomy?
- WP_Query tax query part of slug
- Taxonomy Query Relation field not behaving correctly?
- Get posts in taxonomy randomly
- Loop posts based on permalink term
- Show multiple tax_query from 2 or more post_type in a single code
- WP Query should show No Posts when tax_query $args taxonomies don’t have associated posts
- wp_query with meta_query and tax_query
- How can I get all the posts that are related with a specific taxonomy term?
- Custom taxonomy and query multi conditions
- Empty ‘terms’ in ‘tax_query’ returns an empty array
- Custom query for certain post type OR another post type with a certain category
- WordPress tax_query “and” operator not functioning as desired
- Search custom taxonomy term by name
- Escaping WP_Query tax_query when term has special character(s)
- Tax_query terms ID’s using variable
- How to display post from current Taxonomy in archive page?
- Display posts the match taxonomy term linked from wp_list_categoies?
- WooCommerce: filter by parent product’s taxonomy and product variation’s meta data
- Querying Multiple Custom Taxonomy Terms
- How to combine tax_query and date_query in WordPress
- Querying by taxonomy vs Querying by Custom fields Speed Comparison
- 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*)
- tax_query shows no results if nothing is selected
- get complex results set according to category structure
- WP_Query tax_query problem
- Filtering posts by custom field value not working
- WP_Query, tax_query and term_meta: How to?
- Order taxonomy terms in alphabetical order
- Empty tax_query array returns an empty array
- How can i simulate “taxonomy__in” in query?
- How do I search inside specific taxonomies in WordPress
- Pass array of taxonomy terms to wp_query
- Formulate a url to show posts with both taxonomy terms
- tax_query: Order by slug?
- Taxonomy search/filter with multiple taxonomies and multiple taxonomy terms
- Output an array of terms for a ‘tax_query’ => array()
- Querying on multiple taxonomies pulled from $_GET checkbox array not working?
- WP_Query Not Recognizing Taxonomy Parameter in Custom Search
- Return Taxonomy/Term Information with Posts (WP_Query/get_posts)
- Advanced Taxonomy Queries WordPress
- 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?
- WP Query Args – Title or Taxonomy Value
- Slow queries on a huge database
- wp_query args adding muitiple tax_querys
- Automatically Query Parent Taxonomy
- How Can I Change The Tax Query For The Main Loop For Taxonomy Archives?
- Query with meta_query and tax_query together not working properly
- Custom taxonomy.php not working
- Adding a tax_query to a WP_Query Object
- WP_Query for a taxonomy with different taxonomy types
- Finding WordPress Posts assigned to multiple categories
- Order or Orderby in tax_query (How to define order of terms in WP_Query)
- Using custom taxonomies in a query
- How to Order a list of taxonomies? orderby?
- How to add custom meta to ‘pre_get_terms’?
- Get Child Category only
- How to add tax_query to $args with concatenation
- How to print term name inside wp post loop
- How to echo woocommerce category name
- How to search for meta_query LIKE or tax_query LIKE and grab these posts on search results?
- Tax_Query using WP_Query not working
- Custom taxonomy in WP_Query not working
- Can’t get term id for category archive
- How to make a post with certain taxonomy term display first before other post with only one query?
- Any quicker alternative for WP_Query “NOT IN”
- Exclude post with taxonomy and from the terms (taxonomy & tag) posts count
- Tax Query on product_cat using NOT IN as operator does not exclude that category
- Use get_cat_ID to retreive multiple category IDs
- Only show tag with the same id as the post
- How to use the Term Object from a custom select field in a query
- WP_Query paginate with one term per page?
- Taxonomy archive, categorised by other taxonomy, not hiding empty taxonomies
- WordPress tax_query ignoring relation OR
- Optimal way to make tags in tax_query optional?
- in tax_query this Is the code correct? I need to access beginner video posts for different subject
- Taxonomy Terms That Don’t Exist Display Results
- display all posts from category with and without terms in chronological order
- In Product Category archives how to show Posts having same/similar prod_cat slug structure?
- Category Archive not working for pages
- How to combine nested tax_query logic with other nested query logic?
- WP Query with sticky posts and tax_query
- tax_query not working for taxonomy slug
- Extending WP Query: Custom geolocation meta values work, but tax_query breaks
- Custom query for tag and custom tag from 2 post type
- Multiple tax_queries: display posts titles from several custom taxonomie
- Escaping WP_Query tax_query when term has special character(s)
- How to get hierarchical number of custom taxanomy
- How to use tax_query other than by slug or id or solve custom taxonomy tags conflicts with pre-existing tags?
- Advanced AND tax_query in sidebar with 2 taxonomies
- Output ACF field dynamicaly within a taxonomy loop [closed]
- Multiple Orderby is not working right
- tax_query not working properly with get_posts
- Using WP Query, I want to include all posts in category 1 as long as they are not also in category 2