Home Forums General Issues Relationship Field order Reply To: Relationship Field order

  • A relationship field will return the posts in the order that they appear in the relationship field, basically the order that they are added.

    There is only one way that I know of to alter this order.

    1) Set up the field to return the post IDs instead of post objects. Alternately you can get just the post IDs by using the 3rd argument for get_field() to get the unformatted value get_field('post_category_relationship', false, false);

    2) Query the posts with your own WP_Query() using the value returned for the field in the post__in argument and construct the rest of the arguments to sort them in the order that you want.