Skip to content

Instantly share code, notes, and snippets.

@yellowberri-snippets
Last active December 21, 2015 18:19
Show Gist options
  • Save yellowberri-snippets/6346766 to your computer and use it in GitHub Desktop.
Save yellowberri-snippets/6346766 to your computer and use it in GitHub Desktop.
PHP: ACF: Basic Repeater Field
<?php
$repeaterName = 'repeater';
$pageId = NULL; // Just in case.
?>
<?php if ( have_rows( $repeaterName, $pageId ) ) : ?>
<?php while ( have_rows($repeaterName, $pageId) ) : the_row(); ?>
<?php the_sub_field('sub_field_name'); ?>
<?php endwhile; ?>
<?php endif; ?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment