After digging into this for a big, what I discovered by reviewing the actual SQL via $the_query->request was that if no meta value identified it will return true simply because the query eliminates it.
The solution was to simply include the the meta as an array and use the “compare” operator.
Related Posts:
- WP_Query orderby date not working
- Best way to detect if you are in a SINGLE POST page
- How to do a wp_query using “BETWEEN” with two meta_values?
- Better way to get tag stats?
- Query two taxonomies via URL or link?
- wp_query order by title
- Sort posts by custom taxonomy name
- Wp_query order by multiple custom fields?
- Would this post meta be better added to the post table rather than post_meta table
- meta_query on a date range using an array of values
- How to exclude products by tag from woocommerce shop page?
- Filtering posts by custom field value not working
- wpdb get results doesn’t work with variable
- Query Ignoring ‘exclude’ Parameter?
- Custom pagination with WP_Query generating 404 error
- Query post with meta_query where date is not in future
- Apply CSS class to every second database record [closed]
- How to prevent writing duplicate loops?
- pre_get_posts order by not working
- merge two query arguments into one WP_Query call
- Adding a parameter to the default query
- Using WP_Query in “parse_query” or “pre_get_post” in Posts2Posts
- Taxonomy search/filter with multiple taxonomies and multiple taxonomy terms
- How do I change the order (ASC and DESC) in the following retrieval method using WP_Query?
- While creating Block Themes in WordPress, how can I query custom posts for an Archive view?
- How To Fix WP Query Returns Results But Shouldn’t?
- Weird orderby => post__in issue
- How to extract specific post
- How to query custom post types with mixed AND & OR statements for custom fields
- Custom post type archive pagination query issue
- 2 weeks ago from meta query meta value
- WP Group posts by year(desc) > month(desc) > date(asc)
- Running main loop 2 times with conditional statement
- paged variable not working for category/custom post archive
- Array as ‘key’ in WP_Query
- Check the Specific Meta Key IF its Meta Value is Empty then… (WP Post Meta Query)
- Searching for meta_key returns 0 posts
- Determining Author post count
- How I can change the condition or compare operator for WP_Query in pre_get_posts
- Apply filters to main query instead of creating new one?
- WP_Query returns different results from get_posts() [closed]
- How to pass query string vars between admin pages?
- Query posts by Post title
- Why having more than 10 clauses in WP_Query results in some outputs being dropped?
- mysql query order by
- Why do I have to use pre_get_posts with custom WP_Query to reset posts_per_page?
- Custom Taxonomy Breaks Pages
- Using rewind_posts for displaying multiple categories
- Query to get last posts from authors of blog
- Custom Homepage Pagination using WP_Query
- My website is getting too many dierect home arechives and this is increasing my bounce rate
- WP_QUERY tax_query not working
- How to get latest post excerpt from a specific category?
- Get all content on a “single page” site depending on language
- Get list of all Grandchild Pages
- get latest added term from taxonomy and insert into php variable
- Featured images loop for Orbit Slider
- WP_Query not returning correct result with meta_query parameter
- WP_Query return posts in wrong order
- How do i create a custom post query when the meta value is an array?
- How to do WP_User_Query for Nested Array value Inside Nested Array field
- Display the search results like the original pages
- Pagination on archive.php not working?
- How to use jQuery validation to set the search bar to accept only a specific input?
- Check the product in the cart from which category is and show message
- How to filter on placeholder image
- How to compare between two dates in a nested loop?
- How to query 5 users in random who have published more than 10 posts
- Slow wp_posts and wp_postmeta query using Advance Custom Fields
- WP query for two post types how to order newest to oldest with two different meta fields?
- Get specific value from variable to use in query
- WP_Query with meta_query won’t orderby
- Adding Category in WP_Query Not Working
- meta_query only check if both value are set
- post_type not working when tag__in is present?
- How to create page that lists tags by initial letter?
- Seach and categories not working when ignoring sticky posts in main loop
- posts_per_page increment additional post
- WordPress: Cron locking and Queue
- Correct Way To Run Multiple Queries Sharing Some Base Data
- how to query for meta_value have array
- How to make the default WordPress search return borader results
- WP_Query shows all posts on single post pages
- Display Count of posts
- Optimize WP_Query
- Add a custom variable to query page object
- List ALL posts within last week from current category on category page
- WP_Query on “property” in the options table
- Dynamically name array in WordPress loop – add/get values
- Read more redirection problem
- Creating Custom Query
- Help in query for list links
- Multiple loops on index page with sticky post and pagination
- WP_Query issues with argument posts_per_page
- Search (Custom Form, Custom Search Result)
- Hook to get the query result after listing posts
- Elementor custom query
- How to retrieve _embed (etc) fields in get_posts custom query?
- Using ‘meta_query’ with the ‘pre_get_posts()’ hook disables searching for post titles
- How to save the results of a query as a php file for an autocomplete search bar