Have a repeater field that looks to see what the section type is and then outputs certain code base on that type. For some reason the code is always outputting "No Rows Found" even though there are rows.
I have this working already for something else but wanting to use it again to output something different its not working.
Here is the code below
<?php if( have_rows('layout_section') ): ?>
<?php while(the_repeater_field('layout_section')): ?>
<?php if (get_sub_field('layout_section_type') == "test") { ?>
<?php the_sub_field('post_id'); ?>
<?php } elseif ( get_sub_field('layout_section_type') == "featured" ) { ?>
<p>Featured Section</p>
<?php } elseif ( get_sub_field('layout_section_type') == "test2" ) { ?>
<p>Tewsat 2</p>
<?php } else { ?>
<p>Normal Section</p>
<?php } ?>
<?php endwhile; ?>
<?php
else :
echo 'No Rows Found';
// no rows found
endif;
?>
Here is the config on ACF side
http://i.stack.imgur.com/SbHDp.png http://i.stack.imgur.com/7zvP3.png