The 0 = 1
happens when the terms don’t exist.
You’re creating a query for some set of terms. Before it can add the SQL to that main query, it first does a secondary query to get the term_id’s for the relevant terms. If none are found, then it returns 0 = 1 instead, to shortcut the main query because no terms match the request.
Related Posts:
- “tax_query” parameter not working with WP_Query
- Custom Taxonomy and Tax_Query
- Including all terms in wordpress tax_query
- search query within custom taxonomy term, post title and meta field
- why do drafts return as part of wp_query?
- Hiding taxonomies with no children WP_Query & tax_query
- Set tax_query conditionally with new WP_Query
- How to do a particular wp_query taxonomy search
- 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
- WordPress hiding posts without content on custom taxonomy query. How to solve?
- 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
- How to limit posts to 1 from each term with tax_query?
- Using wp_query is it possible to orderby taxonomy?
- How do I exclude a custom taxonomy from the post loop
- The Operator “NOT IN” Does Not Work In tax_query
- Display one post from each term in a custom taxonomy [closed]
- wp query with multiple taxonomy?
- wp_query orderby title and meta key value (WP3.1)
- Sorting a list of posts displayed under a list of associated terms (which should be sorted without initial articles)
- On Taxonomy Template page, want to add Post_Type
- tax_query not working on main query
- Custom WP_Query breaks default behaviour of viewing right post associated with tax-term!
- The next_posts_link() show me a aditional page in blank
- Help with a query not working with custom taxonomy
- Querying by taxonomy vs Querying by Custom fields Speed Comparison
- Adding session variable and/or cookie based on user-selected input
- Ordering Posts with Custom Taxonomy Terms Array
- List taxonomy / category count showing list published posts only
- Excluding a custom taxonomy term breaks wp_get_post_terms
- Advanced Tax Query
- tax_query shows no results if nothing is selected
- Improving WP_Query performance for multiple taxonomies
- Dynamically tax_query terms
- How to output content based on same custom taxonomy?
- How do I sort posts by custom taxonomy?
- WP_Query, tax_query and term_meta: How to?
- pre_get_posts Tax Query not working for custom author page
- Get pages only with a specific taxonomy
- How to add autocomplete to custom taxonomy for CPT
- WP_Query on custom taxonomy works fine but fails if run through wp_ajax_
- Custom taxonomy query not working with switch_to_blog
- Advanced Query Logic With Multiple Taxonomies
- How do I Use Multiple Loops with WP_Query?
- cannot get multiple loops using tax_query
- ‘wp’ action hook not firing in admin and login?
- Taxonomy archive showing no results
- Get taxonomy parent using child slug (from merged taxonomies)
- Querying on multiple taxonomies pulled from $_GET checkbox array not working?
- Display all posts for taxonomy term across multiple custom post types
- Manipulate WP Query using a custom post type and multiple tax_query taxonomies
- Retrieve Custom Taxonomies according to posts selected
- Custom Taxonomy Not Working When added to WordPress Search
- Can I use OR relation for one item when calling tax_query from WP_Query and use AND for the rest?
- How to display Related Posts based on number of taxonomy terms matched
- tax_query not working in template
- Query custom taxonomy by term id?
- WP_query – Filter by tax_query and meta_query using multiple select
- When filtering query on custom taxonomy; main menu dissapears
- Exclude taxonomy term from all loops, but having it on widget
- Why can’t I use an array of term slugs in WP_Query?
- Using WP_Query and Query_post for the loop?
- WP_Query parameter conflict
- Tax Query only returns for the first of several terms
- tax_query: Don’t show posts with parent term when they have a corresponding child term applied
- How to print term name inside wp post loop
- Custom Category Walker with Image, Fallback to Most Recent Post in Category Image
- tax_query (if the terms are empty)
- Create alphabetical Pagination for custom taxonomy?
- Custom arguments in WP_Query
- How to restrict search on a certain page to only return results against custom taxonomies?
- Wp_query…a type of term a different div
- check if a taxnomy queried in $wp_query?
- Taxonomy.php how to show post only in current taxonomy with wp_query?
- how to access the $query variable inside taxonomy-xxx.php template file?
- Query custom taxonomy for category including children
- Proper way to create taxonomy queries
- Get current page term title to use in WP_Query
- passing moree than one value of slugs in taxonomy using variable
- Get Posts Related to Category By category id or slug
- Display just the Post’s parent Category, not child
- custom post type and a “sticky” position taxonomy
- How to search through all child taxonomies using WP_Query?
- how do you pull data from two taxonomies?
- list all post who have mutual taxonomy as current taxonomy!
- Optimal way to make tags in tax_query optional?
- WP Query tax_query not returning posts
- WordPress Multiple Taxonomy Query
- Custom query for tag and custom tag from 2 post type
- How to get hierarchical number of custom taxanomy
- How do you move custom fields to custom taxonomies using WP Queries
- Tax query array terms display out of order
- Order posts with custom taxonomy array
- Getting grandchildren of a post with a specified custom taxonomy?
- Taxonomy Parameters in WP Query to get posts from two different taxonomies
- Custom Taxonomy + JQuery Tabs
- Using wp_query is it possible to orderby taxonomy?
- wp_get_object_terms count on taxonomies within an category archive
- Loop posts without any taxonomy