Last active
September 26, 2017 20:11
-
-
Save marcbacon/21bf68442b6c4ebf65335a91f9dc8486 to your computer and use it in GitHub Desktop.
[ACF Repeater] ACF repeater syntax simplified. #wordpress #acf
This file contains 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 the_sub_field('sub_field_name'); // display a sub field value ?> | |
<?php endwhile; ?> | |
<?php endif; ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment