Home › Forums › Add-ons › Repeater Field › Repeater Field › Reply To: Repeater Field
I have two repeater fields, the second is duplicated from the first. The first one works fine, but the second one does not return any data.
The php for the problematic repeater is as follows:
<?php if ( have_rows('faq_column_2') ) :
while ( have_rows('faq_column_2') ) :
the_row(); ?>
<div class="faq_accordian">
<div class="title"><?php the_sub_field('question_col2'); ?></div>
<div class="copy"><?php the_sub_field('answer_col2'); ?></div>
</div>
<?php endwhile;
else :
echo ('no rows found');
endif; ?>
My field names match up as shown in this screenshot:
I have tried rewriting the code (rather than copy/paste), I deleted the ACF plugin, uploaded the latest version, edited the sub fields to have a different name, and no luck. Then I deleted the repeater field, added a new one with all new names, still no luck.
I tried a var_dump
as described by @csaborio, and it returns all my data successfully.
The repeater, however, always returns “no rows found”. Very strange. Any ideas?
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!
Accordions are a great way to group related information while allowing users to interactively show and hide content. In this video, Damon Cook goes in-depth on how to create an accessible accordion block using ACF PRO’s Repeater field.https://t.co/RXT0g25akN
— Advanced Custom Fields (@wp_acf) March 2, 2023
© 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.