Yes, it behaves weird. No, shoot me, I can’t get a fix on precisely why and how (stacked joins are probably it).
I say flip it. The only posts you don’t want to see are those with true
custom key. Query for their IDs separately, feed result into post__not_in
, ditch this meta query entirely.
Related Posts:
- pre_get_posts and set
- WordPress Screwing Up ‘orderby’ => ‘meta_value_num’ in ‘pre_get_posts’
- Can I use pre_get_posts to add up values from two different meta_keys?
- meta_query Array
- Order resultset by configured value and then list all the rest
- WordPress meta query not working
- Why does this incorrect pre_get_posts meta_query work for sort order?
- How to do a meta query using REST-API in WordPress 4.7+?
- Get result from meta_query() between two numbers
- Query between two meta keys
- Archives for custom post type based on a “date” meta value
- get_users meta_query
- Meta query interfering with orderby relevance
- meta_query with multiple values
- Return posts with specific meta key first, but the rest in alpha order by last name
- meta_query key value from array
- filter search result with custom post type meta key
- Order by nested named meta queries with ‘exists’ and ‘not exists’
- Using get_terms() with meta_query parameters
- WP_User_Query with meta_query array relation ‘OR’
- Can’t sort order of wp_query with 2 meta keys
- meta_query problem
- Using meta_query and custom fields within pre_get_posts to return posts within a numerical range
- How to exlude posts that have certain meta_value?
- User Relationship
- meta_query results not the same with and without spaces
- WordPress Core – Optimizing meta_query generated SQL?
- Edit post_content on posts with Featured Image
- Display no post when metavalue is 0
- Wildcard with LIKE operator in Meta query
- meta_query, number comparison, not quite working as it should
- Meta Query Compare with Date
- Does meta_query working with value paramater higher then 999?
- Single meta_query query using OR instead of AND in request’s WHERE statement
- meta_query keys and sticky posts
- Custom post type archive with rand and meta_value
- Using meta_query with multiple keys and compare values
- Fastest way to do meta query when I don’t need the actual posts, and just need post_id?
- How to query post only with different excerpt?
- WP_Query with meta_query no results
- Order ascending is ignored in meta query?
- WP User Query Issues
- How to use meta query for greater than value in array?
- Wp Query custom search by meta query
- Filter posts by meta query?
- Meta query date column add [x] days to validate
- How to use orderby with meta_query?
- wordpress Meta_query between numbers range (not working)
- Orderby doesn’t work like expected on custom query
- I would like to have add_post_meta to return the ID instead of true or false
- Order by meta value
- Multiple meta_key ordering with pre_get_posts
- Sorting search results with custom dropdown
- Meta Query Based on Month Range
- Find posts by related taxonomy field
- wordpress meta value compare between two date
- Unpublish Authors With not Fulfilled Fields
- get_users with Serialized Custom Meta Value
- Sorting posts by ACF field
- Unable to use meta_query between currency values when value is over 1 million
- latitude/longitude meta_query
- meta_query displays all results and none, my query is wrong
- Delete all posts with a specific custom field using meta_query
- Use meta_query in args for relationship
- meta_query compare “=“ returns nothing when it seems it should
- Issue with user meta_query
- Woocommerce products search with custom fields
- How to get an archive page meta?
- Search for value(s) in meta field for a multi select
- How can I create a meta_query with an array of dates?
- How to count items of meta query?
- WordPress meta query with meta serialized data array value
- Reading Content in an Array as it relates to a meta_query
- wordpress meta query with multiple meta condition causing a load on server and slows down the server..!
- Trouble with calling an imploded variable in an array
- Memory Leak in Processing Large JSON file
- Exclude Posts Using Meta Query and User Meta
- meta_query not filering but meta_key works fine
- Query for user roles and their skills
- get posts meta query returning the latest post if no meta key found
- WordPress search between two newmeric values with a custom post type
- like_escape notice when using LIKE in meta query
- meta_query for user ID in array
- WP User Query with meta queries
- WP_Query with UNIX timestamp in meta query
- Querying by meta key and value
- How to compare date in post meta value
- Which Meta Query Compare Method Should I use?
- Sort posts by post views and consider meta key
- Sort posts in dashboard using custom field; also include posts where field isn’t set
- Meta query “OR” comparison not working as expected with array
- How to output meta_key in wp_postmeta?
- Looking for a way to exclude frontpage and nav menu from query filter
- WordPress Meta Query very slow with NOT EXISTS comparison
- ACF meta_query field treated as “0” resulting in false negative search when testing ranges
- Is it possible to customize meta query in this way?
- Ordering WP_Query results by second meta_key
- Custom taxonomy with custom meta value is not sorting correctly (query returns the same value for orderby regardless of sort column click)
- How making a new search box in admin post table working on a specific column
- wp_user_query with meta_value_num for leaderboard