Home › Forums › General Issues › Meta query for post object? › Reply To: Meta query for post object?
My fields are as follows: authors is a group field and within that I have a subfield of people (amongst other subfields). People is a multiple post_object select field.
I have the impression from this thread that it is possible to query subfields in this way…
$images_query = new WP_Query([
'posts_per_page' => -1,
'post_type' => 'images',
'meta_query' => [
[
'key' => 'authors_%_people',
'value' => ['85'],
'compare' => 'IN'
],
],
]);
It is not working, please could you advise me.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.