Home Forums General Issues Changing order of Groups Reply To: Changing order of Groups

  • There is a filter in ACF that is not documented

    $field_group = apply_filters('acf/get_field_group', $field_group);

    I can’t give you all the details of how this might be done, but it might be possible to alter the order of the field groups at this point.

    1) You’d need to see what field groups is being loaded.
    2) Then you’d need to see page it is being loaded for, not sure this can be done or how.

    Based on this you might be able to alter the sort order of each field group.

    Like I said, I’m not sure this can actually be done, but if it can be this would be the only way. Also, note that if the editor has already saved a page with these groups that WP will alter the order of the groups to the same as the last time they saved and WP keeps track of this drag-able sort order per post type, so even if you do succeed in changing the order in ACF, it may do you no good when dealing with posts of the same post type. To overcome that you’d need to figure out how to override WP’s sort order.