Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

repeater acf

<?php if( have_rows('slides') ): ?>
    <ul class="slides">
    <?php while( have_rows('slides') ): the_row(); 
        $image = get_sub_field('image');
        ?>
        <li>
            <?php echo wp_get_attachment_image( $image, 'full' ); ?>
            <p><?php the_sub_field('caption'); ?></p>
        </li>
    <?php endwhile; ?>
    </ul>
<?php endif; ?>
Source by www.advancedcustomfields.com #
 
PREVIOUS NEXT
Tagged: #repeater #acf
ADD COMMENT
Topic
Name
3+7 =