Support

Account

Home Forums Feature Requests add orderby paramt to get_field_objects() please

Helping

add orderby paramt to get_field_objects() please

  • i can’t sort the returned array o the function get_field_objects(); i looked in the code:
    function get_field_objects( $post_id = false, $format_value = true, $load_value = true )
    there is no option to manipulate the sql statement 🙁
    would you be so kind and add it please?

  • ACF just calls get_post_meta($post->ID);, there’s nothing to filter to change the order. WP gets the meta values in ID order, meaning that they are always returned in the order they were created. Look at the WP function update_meta_cache(). There is one filter in there that might let you change the query.

    If you want to display fields in a certain order then you need to get the fields where you want them displayed.

Viewing 2 posts - 1 through 2 (of 2 total)

The topic ‘add orderby paramt to get_field_objects() please’ is closed to new replies.