Support

Account

Home Forums Add-ons Repeater Field Repeater not displayed… Reply To: Repeater not displayed…

  • Hi @odyssey3080

    Have you checked the links I gave you before? The fact that it shows Array says that the data is returned correctly, but you use the wrong function to show it. If you have the right setup, I believe you can do it like this:

    <?php if( have_rows('repeat') ):
     	// loop through the rows of data
        while ( have_rows('repeat') ) : the_row();
            // display a sub field value
            $gallery = get_sub_field('galery-head');
            
            if( $gallery ): ?>
                <ul>
                    <?php foreach( $gallery as $image ): ?>
                        <li>
                            <a href="<?php echo $image['url']; ?>">
                                 <img src="<?php echo $image['sizes']['thumbnail']; ?>" alt="<?php echo $image['alt']; ?>" />
                            </a>
                            <p><?php echo $image['caption']; ?></p>
                        </li>
                    <?php endforeach; ?>
                </ul>
            <?php endif; ?>
            
    		the_sub_field('galery-rep');
            
        endwhile;
    else :
        // no rows found
    endif;
    ?>

    You can also debug the variables by following this documentation: https://www.advancedcustomfields.com/resources/debug/.

    Please check the documentation to learn more how to use ACF. If you don’t have time to learn it, I suggest you hire a developer to help you out with it, and I’d recommend looking for one on https://studio.envato.com/ or https://www.upwork.com/.

    Thanks 🙂