Home Forums Add-ons Repeater Field the_repeater_field not working? Reply To: the_repeater_field not working?

  • Yes, correct. OK, well, I am using this instance in two places, but one place doesn’t have a huge list so I think for that one I will just show all and not paginate to simplify this problem a bit more. If I change the above to

    <?php  if(get_field('media')) { ?>
    <div class="info news">
         <?php  $counter = 0; ?>
        <?php  while ( have_rows('media') ) : the_row(); ?>
          $data[$counter]['date'] = get_sub_field('date');
          $data[$counter]['file'] = get_sub_field('file');
          $data[$counter]['title'] = get_sub_field('title');
        <?php  endwhile; ?>
        <?php  for($i = 0; $i < count($data); $i++) { ?>
            <em><?php  echo $data[$i]['date'] ?></em>
            <strong><a href="<?php  echo $data[$i]['file'] ?>" rel="bookmark"><?php  echo $data[$i]['title'] ?></a></strong>
        <?php  } ?>

    That works fine, however I would like to reverse the sort so the most current date is at the top of the list and not the bottom. Do you know how I might change this to do that? Thanks for your help.