WP_Query with meta_query for children
WP_Query with meta_query for children
WP_Query with meta_query for children
Meta_query with multiple keys and multiple values
How to filter wp_list_categories output with some custom post type meta query?
Elementor custom Query with ACF fields to show matching woocommerce products custom fields
How to display multiple custom fields with the same meta_key in an ascending order?
You can’t do this in a query with that kind of data. The only way to truly do it is to retrieve all users, and manually process them in PHP to find the ID. Otherwise, you will get false positives such as the example you gave. The fundamental problem, is the way the data is … Read more
This is not possible, you cannot query sub-values of serialised/structured data in post meta values. To fix this, you need to store the dates you want to query/filter by as separate post meta key/value pairs. Values need to be string/number/boolean whole values to be queried this way. They cannot be complex structures or sub-strings, such … Read more
How to orderby multiple meta fields if some fields are empty
My reputation is too low for me to comment so I’ll do it this way. Make sure that the date format inside ‘value’ is the same as the date formats inside the database fields. Also don’t forget to add the ‘type’ => ‘DATE’ to your query. An example of some code that I’ve used in … Read more
I’m afraid that it’s not possible by default. Using WP_Query you can only check if posts have a featured image set. What you can do instead: Create a hook that fires during post save (e.g. “post_updated”), check if this post has any attachments – save this information in post_meta. Use meta_query with WP_Query to get … Read more