Support

Account

Home Forums Add-ons Repeater Field Splitting Repeater Fields Reply To: Splitting Repeater Fields

  • 
    <div>
      <?php 
        $count = 0;
        while (have_rows('repeater_field')) {
          the_row();
          if ($count > 0 && ($count % 2 == 0)) {
            // split every 2 rows
            ?>
              </div>
              <div>
            <?php 
          }
          ?>
            <div class="repeater-field-<?php echo $count+1; ?>"></div>
          <?php 
          $count++;
        }
      ?>
    </div>