Home › Forums › Add-ons › Repeater Field › Sort by date a repeater field › Reply To: Sort by date a repeater field
Sorry I am learning php, I don’t know where to place the “debug”
So far, still no change. Thank you.
Here is my function.php
<? function my_acf_load_value( $value, $post_id, $field ) {
$order = array();
if( empty($value) ) {
return $value;
}
foreach( $value as $i => $row ) {
$order[ $i ] = strtotime($row['field_5794d01d5c71a']);
}
array_multisort( $order, SORT_ASC, $value );
return $value;
print_r( get_field('programmation', field_5794d01d5c71a) );
}?>
<? add_filter('acf/load_value/key=field_5794d01d5c71a', 'my_acf_load_value', 10, 3);?>
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.