Support

Account

Home Forums ACF PRO Flexible content inside a repeater field Reply To: Flexible content inside a repeater field

  • I looked back and saw that I forgot something important. My code above will create and infinite loop. Someday I should right a book on how to do it 😛

    
    if (have_rows('repeater_field')) {
      while (have_rows('repeater_field')) {
        the_row();
        if (have_rows('flex_content_field')) {
          while (have_rows('flex_content_field')) {
            the_row(); // forgot this line
            $layout = get_row_layout();
            // and the rest of your flex field output
          } // end second while have rows
        } // end second if have rows
      } // end first while have rows
    } // end first if have rows