For the complete documentation index, see llms.txt. This page is also available as Markdown.

Displaying Repeater field

Repeater field acts as a parent to a set of subfields that can be repeated again and again. It's a neat solution for repeating arbitrary content – think slides, team members, CTA tiles, and similar.

Advanced Views Pro natively supports the following repeater types:

  1. ACF: any Repeater field

  2. MetaBox: any Group field (with repeatable option enabled)

1. How to display a Repeater field

  1. Add any Repeater field

  2. Choose target subfields in the SubFields tab

  3. Save the Layout, copy its embedding shortcode

  4. Embed Layout: paste the shortcode inside the target place

Advanced Views automatically creates HTML markup for every subfield and loads rows into the template. You can customize the Layout template to use the Repeater render options.

2. Nested repeaters

To display a nested repeater, follow these steps:

  1. Create the Parent Layout:

    • Go to the Layouts section and create a new 'Parent' Layout.

    • Select the target repeater field in the Fields tab and save the Layout.

  2. Create the Child Layout:

    • Create another Layout, this will be the 'Child' Layout.

    • In the 'Parent Group' field of this Layout, choose the target repeater field that is nested within the Parent Layout and save the Layout.

  3. Configure the Parent Layout:

    • Open the 'Parent' Layout.

    • In the repeater field settings of the Parent Layout, select the 'Child' Layout you just created from the Field Layout setting and save the Parent Layout.

That’s it! You can now use the 'Parent' Layout wherever needed, and it will display both the outer repeater fields and the nested inner repeater.

You can further customize the template and add CSS/JS as usual. Note that the 'Child' Layout is designated for internal use only and cannot be used directly on pages or posts.

To add another depth level, simply repeat the steps outlined above, treating the 'Child' Layout as the new parent for the next level of nesting.

Last updated