Home › Forums › Add-ons › Repeater Field › Programmatically update row index number for rows of a repeater field › Reply To: Programmatically update row index number for rows of a repeater field
The only way to change to order of the rows from a coding standpoint is to get the entire repeater as an array, reorganize the array and then re-save the entire repeater. the index of a row is only the order of that row in the array.
$repeater = array(
array(
// row array
'field_1' => 'value',
'field_2' => 'value'
),
array(
// row array
'field_1' => 'value',
'field_2' => 'value'
)
)
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!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.