Last active
April 12, 2018 11:51
-
-
Save ajithrn/9141206 to your computer and use it in GitHub Desktop.
Wordpress: acf repeater loop
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 | |
/** Functions available | |
* have_rows() | |
* has_sub_field() | |
* get_sub_field() | |
* the_sub_field() | |
*/ | |
?> | |
<?php if( have_rows( 'repeater_field_name' ) ): ?> | |
<?php while( have_rows( 'repeater_field_name' ) ): the_row(); ?> | |
<!-- Variables and datas inside repeater field --> | |
<?php $foo = get_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