Finally I found the real issue after few hours of debugging.
I’m using simple fields
to save the expire date
and country
values. So in simple field
even we are not setting anything it is still save empty string in the database. So when I check the non existing fields, it is not giving correct results, however when I search of empty string(like below) it is giving me the correct output.
$expire_meta_1 = array(
'key' => '_simple_fields_fieldGroupID_3_fieldID_7_numInSet_0',
'value' => '',
'compare' => '='
);
I should thanks to @Sumit to help me to figure out the real issue.
Related Posts:
- Use REGEXP in WP_Query meta_query key
- Getting attachments by meta value
- What is an efficient way to query based on post_meta?
- WP_Query not working as expected for attachments and custom meta_query
- How can I create a WP_Query that returns posts where one meta_value
- WordPress altering my custom query, How to fix it?
- WP Meta Query for some meta (array) values
- How to get sum of meta_values of a meta_key in wp_query according to conditions
- Order posts by meta value and Date
- Get meta info related to current post
- How to make Meta Query case sensitive?
- Performance when getting post meta for post retrieved by meta value
- Get attachment by meta_key value
- Fetch Record based on meta key dates
- how to make members list directory through wordpress post custom meta key.
- Large AND OR query timing out
- Filter posts by comparing custom meta value against postdate
- Query posts by searching for a string in a meta field
- WP_Query meta compare must include ALL array values
- How do i create a custom post query when the meta value is an array?
- wp query to use both author id and meta_query
- Meta query ignores multiple values of the key
- Trouble with serialized metadata
- show most viewed post
- Why can my filter query SOME metadata but not other metadata?
- Query against multiple locations within single custom post type post
- How to set meta_query if get_post_meta returns nested array for that key? [duplicate]
- Saving custom fields for WP_Query to retrieve
- How to show all the associated posts with specific date of data metabox?
- WP Meta Query at depth 2
- WP_Query Posts by Metadata from Option Tree
- Return a single custom post from multiple meta queries
- WP_Query by meta key not returning any posts
- Meta_query compare operator explanation
- meta_query ‘compare’ => ‘IN’ not working
- Sorting: custom query with orderby meta_value_num THEN by title
- WP_Query with checkbox meta_query
- ACF Relationship Field Search Filtering [closed]
- What is the most efficient way of querying posts based on visits and date for current day?
- ACF datepicker meta_query Compare Dates in m/d/Y g:i a – Not in Ymd Format
- Meta Query with date and time on the same Day before given time
- How to grab metabox value in wp_query meta_query key
- Is “orderby” in WP Meta Query conflicting with Meta Query?
- How to count post meta key values for all posts in database
- How to count data records in wordpress which have same meta_value in wp_postmeta table?
- Meta_query with or without value
- Query Posts depends on custom field inside repeater field using acf
- wp_query not searching with apostrophe
- Add condition of user capability in WP_query
- Custom query based on meta key – Reduce three states to two in results?
- Any number in meta key (wp query)
- How to display multiple custom fields with the same meta_key in an ascending order?
- Meta_query with multiple keys and multiple values
- Is it a good idea to improve meta query performance by adding tax query?
- Modify wp-query and sort by post meta key
- How do I query for posts by partial meta key?
- Orderby listing issue
- How to increase load time of an archive/search page (WP_Query)
- get_post_meta in WP_Query
- Make meta query treat meta_value as 1 or 0
- WordPress query posts with multiple post_meta data
- WP Query Meta Value – How To Identify Specific, Unique Values?
- Order by meta_key doesn’t work
- Appending to existing WP_Query’s meta_query if exists
- Multiple meta_key ordering with pre_get_posts
- Error in meta_query not get result
- WP_Meta_Query object with conditionals
- How to get current page nearest parent id?
- meta_query with array as value with multiple arrays
- Why doesn’t my WP Meta Query return any results?
- Sort posts using multiple custom fields and menu_order in single query?
- Search filter between promo and exact price
- meta_query – check for multiple meta values in key which holds an array of values
- Searching for a specific month in a metadata saved as Timestamp (Wp_Query)
- Display posts from multiple value in meta separated by comma
- Getting posts by custom field value
- WP_Query on custom key and value
- Get posts having meta value between two numbers
- wordpress multiple meta value query is not working
- Strange results from WP_Query
- update_post_meta performance in a loop woocommerce
- update_post_meta performance in a loop woocommerce
- Pre get posts sort by meta key returns no results if meta key does not exist
- Sorting with meta_query and multiple, optional meta keys
- meta_query with relation = AND not working as expected when combining EQUALS with NOT EQUALS
- Query by meta value (add a dropdown of all values)
- Order Posts By Custom Field That is an array of objects
- WP_Query returns empty if meta_query has more than 7 values
- Use not custom fields in get_posts() meta_query?
- WordPress meta_query not working
- Using orderby with 2 meta keys
- How to get several fields from wp_query?
- Passing conditional arrays to WP_Query() [closed]
- query by meta value then date and not empty meta value
- Custom query (author is post_author or meta co_author) with Pagenavi pagination
- wordpress sorting using array merge by price in ascending order but price with 0 must be show last
- Get all user with both meta_value
- WordPress extremely slow when using get_posts with multiple meta_query relations
- Use meta query only 3 or more results?
- Use value from meta key array for use in WP_Query