Last active
August 29, 2015 14:22
-
-
Save ajithrn/bf31129794ac283c898b to your computer and use it in GitHub Desktop.
WordPress: ACF Repeater
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php if( have_rows('repeater_field_name') ): // check if the repeater field has rows of data ?> | |
<?php while ( have_rows('repeater_field_name') ) : the_row(); // loop through the rows of data ?> | |
<?php $foo = get_sub_field('sub_field_name'); // getting a sub field value ?> | |
<?php endwhile; ?> | |
<?php else: // no rows found ?> | |
<?php endif; ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment