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:
Pay attention: the Repeater field is supported only in Advanced Views Pro.
1. How to display a Repeater field
Add any Repeater field
Choose target subfields in the SubFields tab
Save the Layout, copy its embedding shortcode
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
Advanced Views Pro supports nested repeaters with no restrictions on the depth of nesting.
To display a nested repeater, follow these steps:
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.
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.
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