The repeater field allows you to create a set of sub fields which can be repeated again and again whilst editing content!
Any type of field can be added as a sub field which allows you to create and manage very customized data with ease!
The repeater field is essentially a wrapper for a group of sub fields, so to loop through the rows of data and target the sub field values, you must make use of a few extra functions. These are described below:
This example shows how to loop through and display data with the have_rows, the_row and the_sub_field functions
<?php // check if the repeater field has rows of data if( have_rows('repeater_field_name') ): // loop through the rows of data while ( have_rows('repeater_field_name') ) : the_row(); // display a sub field value the_sub_field('sub_field_name'); endwhile; else : // no rows found endif; ?>
The Repeater Field can be installed by purchasing a license for ACF PRO. On payment, you will receive a receipt from ACF and a user account allowing access to your downloads. Once ACF PRO is installed, enter your license key to enable plugin updates.
The Repeater Field is no longer available as a separate plugin.