I’ve got a repeater field that I’m trying to out put and it’s not working, and I’m not sure why. It’s looping through the rows the correct number of times but it’s not getting the sub_field information. It’s just outputting blank empty divs.
Here’s my code:
<div class="masonry">
<?php
// check if the repeater field has rows of data
if( have_rows('card') ):
// loop through the rows of data
while ( have_rows('card') ) : the_row();
// display a sub field value
?> <h1> <?php the_sub_field('card-title'); ?> </h1> <?php
endwhile;
else :
// no rows found
endif;
?>
</div> <!-- masonry -->
http://i.imgur.com/pCEMFZ2r.png
and here’s what my field’s are setup like
http://i.imgur.com/undefinedr.png
Sorry, second link was wrong. I don’t have my mouse at the coffee shop right now and copied it wrong. Here’s the correct link: http://i.imgur.com/0R2Jg7Xr.png