I found that you can’t reorder fields in acf_form() by just swapping them around, for example
field_groups => (10, 20); and
field_groups => (20, 10);
…are rendered in the same order.
The only hack I found was using the get_field_groups hook, as shown here:
http://snippets.khromov.se/reordering-field-groups-in-advanced-custom-fields/
Surely, there must be a better way? Ideally, ACF should render the groups in the order they are passed to the function.
Hi @SnitchHomer
Thanks for the issue report. I’ll add this to the to-do and have a look at this soon.
Thanks
E
I easily fixed this issue using Metronet Reorder Posts plugin. https://wordpress.org/plugins/metronet-reorder-posts/
So you reorder the field groups??
Even if that is a solution, I hope elliot can make the field groups render in the order they are added to the field_groups array.
Field groups are “Custom Content” so the reorder plugin which works for any kind of posts can reorder them. It is a hadoc solution but it will help with people in a hurry.