OK, I solved in this way:
'meta_query' => array(
array(
'key' => 'product',
'value' => '"'.get_the_id().'"',
'compare' => 'LIKE'
)
)
Related Posts:
- ACF: How to query for a given value count of an array like field? (e.g.: How many rows has a `flexible_content` field?)
- Meta query with string starting like pattern
- compare meta_query in get_posts arguments
- ACF Relationship Field Search Filtering [closed]
- Filtering a WP_Query meta_query by numeric values isn’t working
- Getting attachments by meta value
- ACF datepicker meta_query Compare Dates in m/d/Y g:i a – Not in Ymd Format
- querying with custom meta field with meta_query
- Order by meta_value_num DESC and meta_value ASC on WP 4.0
- Revolution Slider Orderby Two Custom Fields
- WordPress altering my custom query, How to fix it?
- Querying by taxonomy vs Querying by Custom fields Speed Comparison
- meta_query with array as value
- Order by meta_key in custom post type doesn’t affect the query
- meta_key and meta_value not working together
- Order Posts by meta value AND published date
- If two first numbers exist in wp_meta_query value
- WP_Query meta_query >= date
- How To Fix WP Query Returns Results But Shouldn’t?
- ACF Date Based wp_query
- Custom query based on meta key – Reduce three states to two in results?
- What is the random string I am seeing when I use get_query_var?
- How to make Meta Query case sensitive?
- Any number in meta key (wp query)
- Fetch Record based on meta key dates
- Meta_query with multiple keys and multiple values
- meta_query BETWEEN, but the range is stored in the custom field
- Extend product search with meta in WooCommerce
- how to make members list directory through wordpress post custom meta key.
- Large AND OR query timing out
- meta_value_num not ordering all items
- WP_Query with meta_query dosen’t return results
- Query based on custom fields start and end date
- meta_compare not comparing whole integer
- filter wp_query result with custom field values
- Display posts with specific value first in query
- Get every post with value in meta key
- Custom query filter by ACF date custom field
- add_query_arg to compare and display events from a certain date
- Comparing 2 Decimal Numbers from custom fields and displaying posts
- meta_query weird behaviour, static int will work, but not user data
- Query multiple post types, but different order for each
- Order by the first array within a meta_query
- Order WP_Query by meta_key priority when ‘OR’ relation used for multiple meta values
- Query ACF relationship field – Comparator IN – Value array
- How to _GET multiple value checkbox WP_Query in Custom Toxonomy / Custom Fields
- How do i create a custom post query when the meta value is an array?
- WP Query – grouping posts by same meta key, adding together values from another key
- meta_query is overriding default search
- Trouble with serialized metadata
- Comparing Meta Field date in WPQuery using Meta_Query?
- Getting posts by custom field value
- Query against multiple locations within single custom post type post
- Pre get posts sort by meta key returns no results if meta key does not exist
- Order by Date Custom Field
- Slow wp_posts and wp_postmeta query using Advance Custom Fields
- Query by meta value (add a dropdown of all values)
- Order Posts By Custom Field That is an array of objects
- Get posts meta_query by repater field
- How can I modify standard search query to include also ACF custom fields values?
- Custom WP_query and integrating into theme file
- Wrap group of wp query posts to parent div by date/year
- Using custom field as ‘orderby’ value causing post grouping by publish date
- Compare meta key separation
- The sorting of posts by a meta_query with two keys fails while separated as single queries it works
- query post based on comparison
- Query posts filter not working
- Display all custom meta field values from the database using ACF Repeater
- Get posts by meta value except one post [closed]
- Get posts using multiple values from ACF checkbox as meta query wordpress
- How do I subquery with custom meta fields?
- Best performance for use Custom Field in WP
- Use value from meta key array for use in WP_Query
- WP Query Args – Title or Meta Value
- Can I query custom meta data through WP_Query
- Query WooCommerce orders where meta data does not exist
- WP_Query min and max values
- query posts in functions.php and update a field
- pre_get_posts filter meta_query without conflicting existing meta_query
- Minimising Database Queries when using Advanced Custom Fields
- Query multiple meta values
- Query posts without meta preload
- Excluding pages in WP_query using ACF
- How to do a wp_query with two acf-fields, sorting on one of them
- Using Advanced Custom Field for file upload, how do I load the file url
- Possible to filter custom post type with multiple meta data?
- Query all posts if multiple meta key don’t exist
- Selecting posts with a given meta value for a meta key
- WP_Query: getting posts where custom field exists
- Sort custom post by custom field if none order by latest release
- Form checkbox value going to dynamic URL
- show most viewed post
- Custom query showing all acf field values instead of the one searched
- How to query wordpress with array of meta_values?
- WP Query Meta Query
- WP_Query using meta_query with LIKE doesn’t return what it should
- Return a single custom post from multiple meta queries
- new WP_query using custom fields
- How to get all post_id and meta_value using meta_key in wp_postmeta table
- Display ACF object field data using Elementor Custom Query