Home › Forums › ACF PRO › Create columns Front-End › Reply To: Create columns Front-End
I believe you are talking about the front end, right? Could you please share your code so I can create a modification from it?
If you use the basic loop, I think you can set the class to the first column like this:
// check if the repeater field has rows of data if( have_rows('repeater_field_name') ): // loop through the rows of data while ( have_rows('repeater_field_name') ) : the_row(); // display a sub field value ?> <div class="first"><?php the_sub_field('sub_field_name_1'); ?></div> <div><?php the_sub_field('sub_field_name_2'); ?></div> <div><?php the_sub_field('sub_field_name_3'); ?></div> <div><?php the_sub_field('sub_field_name_4'); ?></div> <?php endwhile; else : // no rows found endif;
I hope this helps 🙂
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!
🚀 This week’s session of ACF Chat Fridays dips into the preliminary results of our first ever user survey. Don’t miss it! https://t.co/3UtvQbDwNm pic.twitter.com/kMwhaJTkZc— Advanced Custom Fields (@wp_acf) May 9, 2023
© 2023 Advanced Custom Fields.