dajocarter
1/26/2016 - 3:49 AM

Example of using an Advanced Custom Field Repeater

Example of using an Advanced Custom Field Repeater

<?php if (have_rows('field_name')) : ?>
  <!-- This container is optional, yet usual -->
  <ul id="repeater-container" class="container">
    <?php while (have_rows('field_name')) : the_row(); ?>
      <!-- Place the markup you want to repeat here -->
      <li class="repeated-item">
        <?php the_sub_field('sub_field_name'); ?>
      </li>
    <?php endwhile; ?>
  </ul>
<?php endif; ?>