Sort Order of ACF get_field _objects() or get_fields()

Published on 13 December 2016 by John Carter

Advanced Custom Fields allows you to get all the form fields for a post_id using either get_field _objects()  or get_fields() . Unfortunately by default as of version 5.4.8 these fields don’t come out in the same order as the WordPress admin. You can sort the fields by the following: