Create a unique ID to easily identify repeater field’s rows
Use this code for create a unique ID for each Advanced Custom Fields Repeater Fields.
<?php if( have_rows('repeater_field') ): $i = 0; ?> <div class="repeater_loop2"> <?php while( have_rows('repeater_field') ): the_row(); $i++; ?> <div class="content-bluck" id="block-<?php echo $i; ?>"> <h2>#div (repeater <?php echo $i; ?>)</h2> <h3><?php the_sub_field('subfield3');?></h3> <p><?php the_sub_field('subfield4'); ?></p> </div> <?php endwhile; ?> </div> <?php endif; ?>