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
- How to use meta_query to retrieve posts from multiple custom post type
- How to get products with the same custom attribute like ean code
- WP_Query filtering in ACF field containing dates
- Problem making a WPQuery with ACF boolean
- Display posts in correct month order using single date custom field
- Order by multiple custom fields within woocommerce hook for catalog ordering (woocommerce_get_catalog_ordering_args)
- get_posts custom field
- Using get_posts to get posts based on a checkbox value with Advanced Custom Fields
- wp_query posts with custom fields number smaller than
- it’s possible make a WP_Query with math operations?
- Multiple meta_key ordering with pre_get_posts
- Sorting search results with custom dropdown
- get_page meta query not working, maybe a bug?
- Posts query according to meta box date
- create metabox to activate slider
- WP_Query: apply an SQL function to meta fileld value
- Query posts using less than
- Expecting statement error from php loop using ACF plugin
- 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
- Retrieve select tag custom values from array and display them in current page with wp_query?
- How to use a dropdown to filter posts by custom field
- Is it possible to add relation between meta_query and tax_query?
- Get meta_value of a specific meta_key from all posts belonging to a specific custom type
- Order WP_Query results by meta key value in custom query
- Query by date from custom field
- Post Query with Meta Query no longer working