digisavvy
6/13/2016 - 9:08 PM

Code for repeater acf

Code for repeater acf

<?php

							 // check if the repeater field has rows of data
							 if( have_rows('product_features') ):
								 echo '<h5>'.SPECS.'</h5>';
								 echo '<ul class="features">';
							 // loop through the rows of data
								 while ( have_rows('product_features') ) : the_row();

									 echo "<li>";
										 // display a sub field value
										 echo the_sub_field('product_feature');
									 echo "</li>";

								 endwhile;
									 echo "</ul>";
							 else :

								 // no rows found

							 endif;

								?>