for loop in acf

Solutions on MaxInterview for for loop in acf by the best coders in the world

showing results for - "for loop in acf"
Manuela
27 Apr 2017
1<?php if( have_rows('slides') ): ?>
2    <ul class="slides">
3    <?php while( have_rows('slides') ): the_row(); 
4        $image = get_sub_field('image');
5        ?>
6        <li>
7            <?php echo wp_get_attachment_image( $image, 'full' ); ?>
8            <p><?php the_sub_field('caption'); ?></p>
9        </li>
10    <?php endwhile; ?>
11    </ul>
12<?php endif; ?>
Elaine
11 Feb 2018
1<?php 
2$rows = get_field('repeater_field_name');
3if( $rows ) {
4    echo '<ul class="slides">';
5    foreach( $rows as $row ) {
6        $image = $row['image'];
7        echo '<li>';
8            echo wp_get_attachment_image( $image, 'full' );
9            echo wpautop( $row['caption'] );
10        echo '</li>';
11    }
12    echo '</ul>';
13}
queries leading to this page
acf repeater exampleacf repeater displayacf repeater on post pagerepeater in a repeater acfacf reapter fieldacf repeater contentrepeater field acf freerows acf repeateracf repeater fieldsrepeat fiel acfacf repeater code examplesacf repeater queryrepeater in repeater acfrepeater custom fields wordpressacf repeater stringrepeater field wordpressacf reotate loopacf pro repeateradvanced custom field repeater fieldhow to get acf repeater fieldsacf repeater inside repeaterget acf repeater fieldacf repeatadvanced custom field repeaterrepeater field acfacf repeatable fieldacf repeatr fieldget field repeater acf in phpedit repeater in repeater acfcustom field repeateracf repeater get all rowsrepeater acf fieldhow to create repeater field in acfacf foreach loopacf rowacf repeater within a repeaterupdate repeater of repeater acfhow to add repeater field in acfhow to get repeater field value in wordpressdisplay repeater in column acfwp get repeater field valuesacf relationship repeaterrepeater acf how touse acf repeateracf repeater fieldacf loop through repeater fieldsacf repeater foreachacf add repeater fieldacf show repeater fieldadvanced custom fields 3a repeater fieldacf looprepeater inside repeater acfacf documentation repeaterrepeater loop acfacf get repeateracf relationship custom post type repeater image fieldacf foreachacf loop through repeaterrepeater in acf in wordpressacf the looprepeater fieldacf repeater fiacf query repeaterloop repeater acfacf loop repeateracf repeater in repeaterrepeater under repeater acfhow to display acf repeater fieldsacf inline repeateracf relationship post type image field in repeateradd repeater acfrepeater acfacf repeater in elementoracf repeat fieldrepeater inphpacf repeater phpacf repeater datahow to get acf repeater fieldacf fake repeater field with arratyget repeater field acfacf plugin repeateracf pro repeater pretty photorepeater in acfwp repeaterrepeater wordpress example htmladvanced custom fields repeateracf repeater fiedlacf repeater options pageacf repeater for elementor acf repeater style pluginadvanced custom fields foreach 28acf 29 repeater fieldsrepeater field data repeater itemacf repeater optionsacf repeater loopacf options page repeaterrepeater acfginstall repeater field in acf wordpressacf repeater for loopget repeater image array acfacf repeater importget field repeater acfacf field repeateracf for each loopacf get repeater fieldacf repeateracf repaeter imageacf pro repeter pretty photofor loop in acf