Home › Forums › Add-ons › Repeater Field › Sort repeater fields by radio button subfield › Reply To: Sort repeater fields by radio button subfield
Thanks to the suggestion bij Deej on this thread I managed to work this out.
$repeater = get_field('recensie');
foreach ($repeater as $key => $row) {
$recensent[$key] = $row['recensent'];
$recensent_functie[$key] = $row['recensent_functie'];
$recensent_link[$key] = $row['recensent_linkedin'];
$recensent_foto[$key] = $row['recensent_foto'];
$recensent_tekst[$key] = $row['recensie_tekst'];
$recensie_type[$key] = $row['recensie_type'];
}
array_multisort($recensie_type, SORT_ASC, $repeater);
foreach( $repeater as $row ) {
// styling for each field
} ?>
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.