Support

Account

Home Forums Add-ons Repeater Field Count rows in nested repeater before loop Reply To: Count rows in nested repeater before loop

  • That depends on what “before the loop” means

    
    // you cannot get the count of repeater rows here
    while(have_rows('flex_field')) {
      the_row();
      // here you can get the count
      $rows = count(get_sub_field('repeater');
    }