Home Forums General Issues Sort User Select field output Reply To: Sort User Select field output

  • I can’t give you a complete answer but I might get you started. In addition to getting the field with
    $related_users = get_field('related_users',get_the_ID());
    also use
    $user_order = get_post_meta($post->ID, 'related_users', true);
    This should return an array of user IDs in the order that they are selected. Then you might be able to sort the users in the correct order.

    Another option is to simply get the user IDs array as I mentioned above, loop over that and get the information yourself using WP functions instead of depending on ACF.