Tag: Advanced Custom Fields (ACF)

Advanced Custom Fields (ACF) Repeater get image URL

To get the image URL for an image field type in Advanced Custom Fields (ACF) Repeater Field <?php if( have_rows(‘repeater_field_name’) ): ?> <?php while( have_rows(‘repeater_field_name’) ): the_row(); // vars $image = get_sub_field(‘image’); ?> <img src=”<?php echo $image[‘url’]; ?>” /> <?php endwhile; ?> <?php endif; ?>

Continue reading Advanced Custom Fields (ACF) Repeater get image URL

WordPress Advanced Custom Fields (ACF) Repeater Field usage

This example shows how to loop through and display data with the have_rows, the_row and the_sub_field functions // check if the repeater field has rows of data if( have_rows(‘repeater_field_name’) ): // loop through the rows of data while ( have_rows(‘repeater_field_name’) ) : the_row(); // display a sub field value the_sub_field(‘sub_field_name’); endwhile; else : // no…

Continue reading WordPress Advanced Custom Fields (ACF) Repeater Field usage