Meta_query compare operator explanation
I noticed that there are bunch of operator can be use for compare in meta_query.
However, I am not quite sure what operator I should use, it is somehow confusing like = and LIKE operator.
I noticed that there are bunch of operator can be use for compare in meta_query.
However, I am not quite sure what operator I should use, it is somehow confusing like = and LIKE operator.
Here are the args for my query :
Trying to build a search that not only searches the defaults (title, content etc) but also a specific custom field.
Using v2 of the REST API, I’m wanting to query some posts by multiple meta keys. With v1 I was able to format the url like &filter[meta_value][month]=12&[meta_value][year]=2015 and it worked (after exposing the meta values to the API).
I’m planning a custom WordPress theme where the Custom Post Type (CPT) will have latitude and longitude coordinate as it’s meta value. The latitude and longitude will be displayed as a Marker in a Google Map.
I have a custom WP_Query with the following meta_query:
The default search returns all post types, which is what I want. But for one specific custom post type I want to limit the result to a specific meta key value (a custom date that must be greater than today).
I am trying to filter by a meta query but no matter what I try I can not make it work.
I am curious whether WordPress is able to run nested meta_query, with each having different relation keys? As of WordPress 3.0, tax_query is able to perform this function; I’m wondering whether this has an equivalent with meta_query.
I have posted this on StackOverflow too, not sure if that’s allowed – if not let me know and I’ll remove one (I don’t want to look like I’m spamming). Anyway….