I am struggling to find a solution for this problem:
<?php $counter = 1; while (has_sub_field('company_members')) : echo '<div class="row">'; while ($counter <= 3) : get_template_part('team-member-box'); ++$counter; endwhile; echo '</div>'; $counter = 1; endwhile; ?>
What I want the code to do is to print 3 "team-member-box" and then create a new row.
So far all the boxes have been collocated in one single row.
The code right now prints the same box for three times, instead I want it to take 3 elements in the repeater field "company_members" and print within a new row the next 3 elements.
Thank you in advance for your help.