Home Forums ACF PRO Repeater reverse order in admin area Reply To: Repeater reverse order in admin area

  • So,,, this was quite easy once I turned on my brain.
    The instructions were on the website all a long :-))

    function my_acf_load_value( $value, $post_id, $field ) {
        $order = array();
        if( empty($value) ) {
            return $value;
        // populate order
        // Remember to change the field_5a4d0e70a5d3f to the field that you want to sort by
        foreach( $value as $i => $row ) {
            $order[ $i ] = $row['field_5a4d0e70a5d3f'];
        array_multisort( $order, SORT_DESC, $value );
        return $value;
    // Remember to change "book_repeater" to your repeater field name
    add_filter('acf/load_value/name=book_repeater', 'my_acf_load_value', 10, 3);