I’m trying to get my repeater to order by dates.
I’m close but as you can see the dates are not quite right. Any help with tunning my query to display the dates correctly would be much appreciated!
<?php
$repeater = get_field('upcoming_program_dates');
$order = array();
foreach( $repeater as $i => $row ) {
$order[ $i ] = $row['date'];
}
array_multisort( $order, SORT_DESC, $repeater );
if( $repeater ): ?>
<?php foreach( $repeater as $i => $row ): ?>
<p><?php echo $row['date']; ?> - <?php echo $row['date_end']; ?></p>
<?php endforeach; ?>
<?php endif; ?>
