Home Forums General Issues WordPress template page content not showing Reply To: WordPress template page content not showing

  • Hi @laurentdotcom

    I’m afraid I don’t understand your current setup, so I’ll just assume that the ‘menu_sections’ repeater is assigned to a page with ID of ‘3053’. In that case, I believe you should be able to do it like this in your index.php:

    <div id="two" class="section">
        <?php $page_id = 3053; ?>
        <?php if ( have_rows('menu_sections', $page_id) ):
            while ( have_rows('menu_sections', $page_id) ): the_row(); ?>
                <h2><?php the_sub_field('section_title'); ?></h2>
                <?php if ( have_rows('section_items') ): ?>
                    <?php while ( have_rows('section_items') ): the_row(); ?>
                            <td><?php the_sub_field('dish_name'); ?></td>
                            <td><?php the_sub_field('dish_description'); ?></td>
                            <td>€<?php the_sub_field('dish_price'); ?></td>
                    <?php endwhile; ?>
                <?php endif; ?>
            <?php endwhile;
        endif; ?>

    I hope this helps 🙂