Support

Account

Home Forums ACF PRO Different layout if 2 or more rows? Reply To: Different layout if 2 or more rows?

  • Not exactly sure what you’re trying to do to be honest.

    get_row_index() will only give you the current index, not the number of rows. This is good if you want to alter something based on the current row, but not if you are trying to change something based on the number of rows.

    if you want to get the number of rows

    
    $rows = count(get_field('row_content_boxes'));