Support

Account

Home Forums General Issues getting a fatal error (recently) Reply To: getting a fatal error (recently)

  • Hi @mathieu

    In case you are using a repeater, I would recommend that you use a the standard repeater loop to access the repeater rows.

    <?php
    
    // 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
            the_sub_field('sub_field_name');
    
        endwhile;
    
    else :
    
        // no rows found
    
    endif;
    
    ?>
    

    If you just want the first row, you can introduce custom code to only pick the first row.

    I hope this helps.