Displaying Group field
The Group field type provides a way to structure fields into groups. It assists in better organizing the edit screen UI, as well as the data. In contrast to the Repeater field, the Group field always consists of a single row.
Advanced Views Pro natively supports the following group types:
Pay attention: the Group field is supported only in Advanced Views Pro.
1. How to display a Group field
Add any Group 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 them into the template. You can customize the Layout template to change the output.
2. Nested Groups
Advanced Views Pro supports nested groups with no restrictions on the depth of nesting.
To display a nested group, follow these steps:
Create the Parent Layout:
Go to the Layouts section and create a new 'Parent' Layout.
Select the target group 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 group field that is nested within the Parent Layout and save the Layout.
Configure the Parent Layout:
Open the 'Parent' Layout.
In the group 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 group fields and the nested inner group.
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