Home › Forums › ACF PRO › How to query posts in multiple select relationship field (serialized array) › Reply To: How to query posts in multiple select relationship field (serialized array)
Hi John, Thank you for your help…
Unfortunately, it didn’t work.
It just returns all sites.
I tried changing the posts__in line to the following (just to see if it mad a difference) but still just returns all sites instead of the 3 it’s supposed to.
'posts__in' => array(46,89,35),
Just for clarification, if I do the following…
$sites = get_field('site');
print_r($sites);
It returns…
Array ( [0] => 46 [1] => 89 [2] => 35 )
posts__in doesn’t seem to be working as it should.
Thanks again for your help on this.
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.