Home › Forums › Add-ons › Repeater Field › Split Repeater fields › Reply To: Split Repeater fields
I would do this a little different. I’m only including enough to give you an example
<?php
if (have_rows('bp_client_logos')) {
// there are rows in the repeater
// create counter
$count = 0;
?>
<div class="section"><!-- open first .section -->
<div class="row"><!-- open first .row -->
<?php
while (have_rows('bp_client_logos')) {
the_row();
if (($count%16) == 0 && $count > 0) {
// we have output 16 repeater rows
// and this needs to be the first row of the next section
// close the last row and section opened
// and open a new section and row
?>
</div><!-- close last .row -->
</div><!-- close last .section -->
<div class="section"><!-- open next .section -->
<div class="row"><!-- open next .row -->
<?php
} // end if 16
?>
<div class="column">
and display the rest of the row content here
</div>
<?php
// increment count
$count++;
} // end while have_rows
?>
</div><!-- close last .row -->
</div><!-- close lase .section -->
<?php
} // end if have_rows
?>
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.