Home › Forums › Backend Issues (wp-admin) › Sort Repeater in BACK end, Where Data is Entered › Reply To: Sort Repeater in BACK end, Where Data is Entered
When I put define('WP_DEBUG', true);
in wp-config.php. And have this in my functions.php file:
function my_acf_load_value( $rows ) {
foreach ( $rows as $key => $row ) {
$column_id[ $key ] = $row[ 'field_593c04d244712' ];
}
array_multisort( $column_id, SORT_ASC, $rows );
return $rows;
}
I get the following errors on the front end:
Warning: Invalid argument supplied for foreach() in functions.php on line 110
Warning: array_multisort(): Argument #1 is expected to be an array or a sort flag in functions.php on line 113
Line 110:
foreach ( $rows as $key => $row ) {
Line 113:
array_multisort( $column_id, SORT_ASC, $rows );
Not sure how to keep this filter functional AND prevent these Warnings. What do I need to do to prevent them?
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.