Support

Account

Home Forums ACF PRO user relationship field query – how to? Reply To: user relationship field query – how to?

  • I think i have to do a user query like this:

    – getting all users
    – check if the user IDs are equal to an ID in the custom field entrys added to the page
    – than drop the ones whos ID is not in

    EDIT: this is the solution. So simple that I could not get it 😀

    <?php
        //get the users
        $ids = get_field('personen_intern', false, false);
        //include them in the query
        $args = array(          
            'include' => $ids,
        );
    ?>