Support

Account

Home Forums Add-ons Flexible Content Field Count rows of flexible field? Reply To: Count rows of flexible field?

  • 
    <?php 
      if (have_rows('flexible_field')) {
        $count = 0;
        while (have_rows('flexible_field')) {
          the_row();
          $count++;
          echo '<div>',$count,'</div>';
        }
      }
    ?>