Support

Account

Home Forums Add-ons Repeater Field Output Repeater In Two Columns Reply To: Output Repeater In Two Columns

  • I worked it out:

    
            <ul class="col-md-6">
              <?php $i = 0; $j = count( get_field('repeater_field') );?>
              <?php if( have_rows('repeater_field') ): while ( have_rows('repeater_field') ) : the_row(); ?>
                    <?php the_sub_field('sub_field'); ?>
                <?php if ( ( $i + 1 ) == ceil($j / 2) ) echo '</ul><ul class="col-md-6">'; ?>
                <?php $i++; endwhile; ?>
              <?php endif; ?>
            </ul>