Support

Account

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.