As @Howdy_McGee suggested and I made a quick test. Removing key do the trick so you can just remove the key and add compare LIKE if you do not want exact match.
Example:-
$posts = new WP_Query(array(
'meta_query' => array(
array(
'value' => 'meta_value'
)
)
));
This will produce the SQL like
WHERE 1=1 AND ( CAST(wp_postmeta.meta_value AS CHAR) = 'meta_value' )
That is what we want!
Related 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
- Add indexing to meta_value in wp_postmeta
- Custom WP_Query order by post_meta and (author) user_meta
- Perform query with meta_value date
- Meta Query with date and time on the same Day before given time
- How to grab metabox value in wp_query meta_query key
- datetime picker, timestamps and meta queries
- Compare two meta-fields in a wp_query (where meta-field-A is larger than meta-field-B)
- How can I create a WP_Query that returns posts where one meta_value
- Meta Query querrying several post types based on ACF fields is broken after update to WP 4.1
- Querying by taxonomy vs Querying by Custom fields Speed Comparison
- How to get sum of meta_values of a meta_key in wp_query according to conditions
- How to count data records in wordpress which have same meta_value in wp_postmeta table?
- WP Query – Get WooCommerce Products with variation that is in stock
- 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?
- How to make Meta Query case sensitive?
- Performance when getting post meta for post retrieved by meta value
- 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
- Tax query AND/OR meta query [duplicate]
- Orderby listing issue
- Help ordering Post loop by two meta values
- How to filter a query by multiple meta keys and order by other meta keys
- Query posts with “non set” meta value
- Ordering a mysql style datetime stamp with meta_query
- Meta Query doesn’t works as espected
- Wp_query with 2 meta keys and array of meta values
- Advanced WP_Query with meta_query, orderby?
- meta_query: check if number exists
- Event with multiple dates, display events chronologically
- Issues with search after added meta_query
- Display posts with specific value first in query
- WP_Query: apply an SQL function to meta fileld value
- How to search for meta_query LIKE or tax_query LIKE and grab these posts on search results?
- How to create dynamic value in WP_Query meta_query
- query post by author gender
- How do I add an item to the WP admin menu?
- Multiple meta query from array
- WP Query / Meta Query [duplicate]
- Query posts by searching for a string in a meta field
- WP_Query with 4 post meta field arguments gives 500 internal server error
- Use have_posts() with array of post results retrieved by $wpdb->get_results
- Query multiple post types, but different order for each
- How to add date_query to meta_query array
- Order by the first array within a meta_query
- Query ACF relationship field – Comparator IN – Value array
- Combine query in WP_User_Query()
- Multiple nested meta queries
- How to _GET multiple value checkbox WP_Query in Custom Toxonomy / Custom Fields
- Custom meta_query order for Elementor based on post meta key [closed]
- What’s wrong with this meta query? (order by meta key, then title, doesn’t work)
- How can I modify the query by adding to the existing query?
- ElasticPress is (aparently) messing with my search filters
- Meta query ignores multiple values of the key
- Multiple meta_query not returning rows
- WordPress Query custom ordering by temporary variable
- Check for not NULL not working in meta query
- Comparing Meta Field date in WPQuery using Meta_Query?
- Get unique post by meta value using wp_query
- How to create better WP_Query to look for date time which is anywhere between two meta values?
- Query against multiple locations within single custom post type post
- WP_Query, ACF field and array
- Order by Date Custom Field
- Filtering WP_Query based on wp_postmeta keys values
- WP Query. Ordering posts by another post types meta
- Complex Meta Query
- Multiple meta_query not working
- compare for multiple meta values for same key in wp_query
- datetime picker, timestamps and meta queries
- WP_Query with meta_query won’t orderby
- meta_query only check if both value are set
- Get posts meta_query by repater field
- Query 3 meta_key and orderby
- wp_query sorting – one specific meta_key value at last and then sort by create date
- Extending WP Query: Custom geolocation meta values work, but tax_query breaks
- meta_query not working with the_content()
- Using custom field as ‘orderby’ value causing post grouping by publish date
- Get closest event where meta_key field is an array
- Set right order for query that returns posts based on two custom fields
- Meta_query weird behaviour
- Looking for a way to exclude frontpage and nav menu from query filter
- Creating Custom Query
- Get posts by meta value except one post [closed]
- WP_Query by meta key not returning any posts
- Using ‘meta_query’ with the ‘pre_get_posts()’ hook disables searching for post titles
- WP query with multiple custom meta not respecting orderby
- Get posts using multiple values from ACF checkbox as meta query wordpress
- WP Query returning all posts when Meta_query is null
- Passing a variable containing a comma separated list of values in a meta-query
- Complicated `orderby` based on text in custom field
- meta_query post_date not returning results
- WP Query: orderby with one meta key, but multiple values