Home › Forums › General Issues › Not working nested repeaters
So I needed to retrofit a nested repeater with another layer around it (bundesland) the other parts were all ready implemented and working fine.
This is my code
<div id="page-verkaufstellen" div class="row" role="main">
<?php do_action( 'foundationpress_before_content' ); ?>
<?php while ( have_posts() ) : the_post(); ?>
<div class="small-12 columns">
<h1 class="entry-title"><?php the_title(); ?></h1>
</div>
<div class="small-12 medium-8 columns">
<?php do_action( 'foundationpress_page_before_entry_content' ); ?>
<div class="entry-content">
<?php the_content(); ?>
<?php if( have_rows('bundesland') ): ?>
<?php while( have_rows('bundesland') ): the_row(); ?>
<h2><?php the_sub_field('bundesland_name'); ?></h2>
<?php if( have_rows('verkaufstellen') ): ?>
<?php while( have_rows('verkaufstellen') ): the_row(); ?>
<h2><?php the_sub_field('postleitzahl'); ?></h2>
<?php if( have_rows('verkaufstelle') ): ?>
<?php while( have_rows('verkaufstelle') ): the_row(); ?>
<div class="infobox verkaufstelle"><?php the_sub_field('verkaufstelle_entry'); ?></div>
<?php endwhile; ?>
<?php endif; ?>
<?php endwhile; ?>
<?php endif; ?>
<?php endwhile; ?>
<?php endif; ?>
</div>
</div>
<div class="small-12 medium-4 columns">
<div class="infobox">
<p>Hier können Sie bequem <b>online</b> bestellen</p>
<a href="/shop" class="button">Zum Shop</a>
</div>
<img src="/wp-content/uploads/csm_P8010239_68bca296bf.jpg">
</div>
<?php endwhile;?>
<?php do_action( 'foundationpress_after_content' ); ?>
</div>
and attached an Image, I tried only using parts and only the bundesland repeater, but it’s not working and I can’t wrap my head around what is going wrong here.
If anyone has a hunch or an idea (I don’t even know if nesting this deep is possible with acf) I’d be delighted because this is driving me insane.
This is extremly embarassing but one of my team added a greek question mark to my code…
Edit: It’s not in this code but in another part of the sites code, so if anyone needs a tripple nesting code example that works, here it is.
You must be logged in to reply to this topic.
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!
CPT registration is coming to ACF! We demoed the new feature during the most recent session of ACF Chat Fridays. Check out the summary for the details. https://t.co/k2KQ3WWBAz
— Advanced Custom Fields (@wp_acf) March 7, 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.