Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php if( have_rows('your_repeater_field') ):
- $total = count(get_field('your_repeater_field'));
- $i = 1; ?>
- <div class="flex-wrap">
- <?php while( have_rows('your_repeater_field') ): the_row(); ?>
- Do whatever with the repeater item
- <?php if ( $i % 4 == 0 && $i != $total ) {
- echo '</div><div class="flex-wrap">';
- } ?>
- <?php $i++; endwhile; ?>
- </div>
- <?php endif; ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement