Last active
January 9, 2017 07:04
-
-
Save antiden/3d43fd3997f672ed534891be98593a0f to your computer and use it in GitHub Desktop.
WP ACF Repeater
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') ): ?> | |
<?php while ( have_rows('repeater_field_name') ) : the_row(); ?> | |
<?php the_sub_field('sub_field_name'); ?> | |
<?php endwhile; ?> | |
<?php else : ?> | |
<?php endif; ?> | |
/*Count fields*/ | |
<?php | |
$i = 1; | |
while(has_sub_field('myrepeaterfield')): | |
?> | |
<p>Step <?php echo $i; ?></p> | |
<?php | |
$i++; | |
endwhile; | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment