Home › Forums › Add-ons › Repeater Field › Repeater field saying no rows found › Reply To: Repeater field saying no rows found
Tried that way and still no luck. It is still saying there are no rows found when there are rows.
<?php if( have_rows('layout_section') ): ?>
<?php while ( have_rows('layout_section') ) : ?>
<?php the_row(); ?>
<?php if (get_sub_field('layout_section_type') == "feat_section") { ?>
<p>Featured Section</p>
<?php } elseif ( get_sub_field('layout_section_type') == "feat2" ) { ?>
<p>Featured Section 2</p>
<?php } elseif ( get_sub_field('layout_section_type') == "feat3" ) { ?>
<p>Featured Section 3</p>
<?php } else { ?>
<p>Normal Section</p>
<?php } ?>
<?php endwhile; ?>
<?php
else :
echo '<p>No Rows Found</p>';
// no rows found
endif;
?>
Here are the config pages. First one of the repeater field itself
The layout type options
Just using it for text at the moment for debugging
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
Are you building WordPress sites with ACF and @BeaverBuilder, and wanted to use your ACF Blocks in both the block editor and Beaver Builder?
— Advanced Custom Fields (@wp_acf) May 10, 2023
The BB team recently added support for using ACF Blocks in Beaver Builder. Check it out 👇https://t.co/UalEIa5aQi
© 2023 Advanced Custom Fields.
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Cookie Policy. If you continue to use this site, you consent to our use of cookies.