Home Forums Add-ons Repeater Field ACF nested repeater fields


ACF nested repeater fields

  • Hi!

    I’m slowly getting to understand ACF and nested repeaters, but I am having trouble displaying it on my site.

    The “Menu Sections” displays, but I must be doing something wrong with the menu items, because it wont display them..

    This is what I have in a code block:

    Thankful for any tips

  • If you’re using a nested repeater then your second repeater loop needs to be completely within your first repeater loop

    if (have_rows('repeater')) {
      while (have_rows('repeater')) {
        // show field from first repeater
        // nested repeater
        if (have_rows('nested_repeater')) {
          while (have_rows('nested_repeater')) {
            // show fields from nested repeater
          } // end while nested repeater
        } // end if nested repeater
      } // end while repeater
    } // end if repeater
Viewing 2 posts - 1 through 2 (of 2 total)

The topic ‘ACF nested repeater fields’ is closed to new replies.