Total includes an exclusive feature that enables you to create dynamic templates for displaying ACF repeater fields. The repeater field is a premium field type available in the Advanced Custom Fields Pro plugin, allowing you to assign repeatable sets of data to a post. It acts as a parent field containing a set of sub-fields, which can be repeated as needed.
This guide assumes you are already familiar with creating and working with ACF fields, have set up a repeater field, and understand how to use Total’s dynamic templates.
The purpose of this article is to explain how you can loop through an ACF repeater field to display data on the frontend of your website in the context of a single post or archive dynamic template.
Create a Repeater Field Template
Go to Theme Panel > Dynamic Templates
and create a new template.
Select ACF Repeater
for your template type.
Design the ACF Repeater Template
Now you can use your page builder (WPBakery or Elementor) to create the design you want for the repeater field frontend output. This may include images, text, video, headings…etc.
When creating your template, you’ll want the output to display the values from the repeater field. To achieve this, you’ll need to insert elements and adjust their settings to pull the data directly from the custom field.
For instance, if your repeater field contains an image sub-field, you’ll need to insert an Image element. Then, set the image source to “Custom Field” and select the appropriate sub-field. This ensures that the image element dynamically displays the image associated with that specific repeater entry.
Here’s how you can do it:
When selecting an ACF repeater subfield through one of the theme elements, the parent field name will appear before the subfield name, as shown in the screenshot above. This naming convention helps you easily locate your subfields and avoids potential conflicts, especially if you have multiple repeaters with subfields that share the same name.
Display the ACF Repeater Template
Simply edit the dynamic template where you wish to display the repeater field data and insert the ACF Repeater element.
Once you added the element to the page you can edit it to select the repeater field you want to pull data from and the template to use for the display.
Why Do I Have to Create a Separate Template for the Repeater Field Display?
When creating dynamic templates you can easily display any custom field value by simply inserting an element and selecting custom field as the source. So you may be wondering: why do I need to create a seperate template for repeater fields?
In order to display ACF repeater fields on the frontend, you must create a custom loop to iterate through each repeatable entry and output the desired code for each one.
It would have been possible to create a “group” element similar to a WPBakery section or row, where you could select your repeater field, and any content added within this element would dynamically pull data from that field. This approach would consolidate all the code into a single page. However, while convenient, this method is more limited in functionality and less efficient overall.
By using a custom template for the repeater field, we can keep all the code separate, making it much easier to manage. This approach enables users to leverage every WPBakery element when building the template, including sections, rows, and columns, while keeping the content dynamic and modular.
Another advantage of this method is its flexibility—it allows the same ACF (Advanced Custom Fields) template to be reused in multiple locations across the site, with the ability to control it globally. This promotes consistency and makes content management more efficient.
Moreover, by separating the repeater field logic into its own template, the “main” templates remain cleaner and lighter. With fewer elements in the core template, pages are quicker to load, easier to edit, and simpler to maintain.
Another key benefit is that this solution is compatible with any page builder, including WPBakery, Elementor, and Gutenberg. No matter which builder is used, the custom template will work seamlessly.