Support

Account

Home Forums ACF PRO Create columns Front-End Reply To: Create columns Front-End

  • Hi @pepacobos

    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 🙂