Home › Forums › General Issues › Sort by menu order with get_field_objects() › Reply To: Sort by menu order with get_field_objects()
If you use
var_dump($fields);, you will see that each field object has a “menu_order” value. You can use array_multisort() on this value to sort it like sorting a repeater field. This page should give you more idea about it: http://www.advancedcustomfields.com/resources/how-to-sorting-a-repeater-field/.
I hope this helps.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
🚨 The 2023 ACF Annual Survey closes tomorrow! This is your last chance to complete the survey and help guide the evolution of ACF. https://t.co/0cgr9ZFOJ5— Advanced Custom Fields (@wp_acf) May 18, 2023
© 2023 Advanced Custom Fields.