Support

Account

Home Forums Add-ons Repeater Field Different layout for nth rows of repeater Reply To: Different layout for nth rows of repeater

  • 
    if (have_rows('repeater')) {
      $count = 0;
      while (have_rows('repeater')) {
        the_row();
        $class = 'col-4';
        if ($count < 3) {
          $class = 'col-3';
        }
        ?><div class="<?php echo $class; ?>">content here</div><?php 
        $count++;
      }
    }