meta_query with value = any value
-
Hello,
When you have a meta_query as follows:$meta_query_args = array( 'relation' => 'OR', // Optional, defaults to "AND" array( 'key' => '_my_custom_key', 'value' => 'Value I am looking for', 'compare' => '=' ), array( 'relation' => 'AND', array( 'key' => '_my_custom_key_2', 'value' => 'Value I am looking for 2', 'compare' => '=' ), array( 'key' => '_my_custom_key_3', 'value' => 'Value I am looking for 3', 'compare' => '=' ) ) ); $meta_query = new WP_Meta_Query( $meta_query_args );
How to get ‘any value’ instead of ‘Value I am looking for’?
I use a more complicated meta_query that doesn’t give a result now for ‘any value’, neither for value = ”, value = false or value = none. The query is only executed for fixed values.
Please, how to solve this? Thanks.
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘meta_query with value = any value’ is closed to new replies.