Add-ons

The Repeater Field

Overview

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!

Template Usage

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:

Basic Loop

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;

?>

See more examples

Installation

ACF PRO

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.

Plugin

The Repeater Field may also be installed by purchasing a license for this add-on. On payment, you will receive a receipt from ACF and a user account allowing access to your downloads. Once the add-on is installed (requires the free version of ACF to also be installed) you will not need to enter any license key information.

Related

ACF PRO

Smarter, faster and more refined.

The next generation of ACF is now available!

ACF PRO combines the feature packed ACF version 5 plugin plus all 4 premium add-ons together in the most powerful and attractive version of Advanced Custom Fields ever!

Learn more about ACF PRO