Home Forums General Issues Not working nested repeaters


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 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 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>
                <img src="/wp-content/uploads/csm_P8010239_68bca296bf.jpg">
        <?php endwhile;?>
        <?php do_action( 'foundationpress_after_content' ); ?>

    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.

Viewing 2 posts - 1 through 2 (of 2 total)

The topic ‘Not working nested repeaters’ is closed to new replies.