Support

Account

Home Forums General Issues Admin Page Link Sorting Reply To: Admin Page Link Sorting

  • There are three filters that you may be able to use, but they are not documented.

    This is from ACF4 and is documented here: http://www.advancedcustomfields.com/resources/acf-fields-post_object-query/

    
    $args = apply_filters('acf/fields/post_object/query', $args, $field, $post);
    $args = apply_filters('acf/fields/post_object/query/name='.$field['_name'], $args, $field, $post );
    $args = apply_filters('acf/fields/post_object/query/key='.$field['key'], $args, $field, $post );
    

    This is from ACF5, these are not documented but would work the same way that the above filters work.

    
    $args = apply_filters('acf/fields/page_link/query', $args, $field, $options['post_id']);
    $args = apply_filters('acf/fields/page_link/query/name='.$field['name'], $args, $field, $options['post_id'] );
    $args = apply_filters('acf/fields/page_link/query/key='.$field['key'], $args, $field, $options['post_id'] );
    

    You may be able to reorder them by date. I’ve seen several topics here though that indicate that trying to alter the order of the posts can sometime break the returned results. This is because ACF groups the posts and pages and altering the sort order can cause the grouping to go wrong. The only thing you can do is try it.