Support

Account

Home Forums Add-ons Repeater Field Repeater not working in IF Reply To: Repeater not working in IF

  • You don’t need “the_row()” on the first line. The correct code would be:

    <?php if(have_rows('activity_links')): ?>
      <h3>Links</h3>
      <ul>
        <?php while(have_rows('activity_links')): the_row(); ?>
        <li><a href="<?php echo the_sub_field('link_url'); ?>"><?php echo the_sub_field('name_for_link'); ?></a></li>
        <?php endwhile; ?>
      </ul>
    <?php endif; ?>