Skip to content

Instantly share code, notes, and snippets.

@amanhstu
Created November 30, 2016 18:53
Show Gist options
  • Save amanhstu/81ba82e63e503dca6bd9d070f0e16e05 to your computer and use it in GitHub Desktop.
Save amanhstu/81ba82e63e503dca6bd9d070f0e16e05 to your computer and use it in GitHub Desktop.
<?php // Advanced custom fields repeater
if(get_field('repeater_field_name')): ?>
<ul>
<?php while(has_sub_field('repeater_field_name')): ?>
<li>sub_field_1 = <?php the_sub_field('sub_field_1'); ?>, sub_field_2 = <?php the_sub_field('sub_field_2'); ?>, etc</li>
<?php endwhile; ?>
</ul>
<?php endif; ?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment