Support

Account

Home Forums Add-ons Repeater Field Responsive images from repeater field Reply To: Responsive images from repeater field

  • Many thanks for Your advise 🙂

    My working code is

    <?php
    			// check if the repeater field has rows of data
    			if( have_rows('zdjecia') ):
    			// loop through the rows of data
    			while ( have_rows('zdjecia') ) : the_row();
    			// display a sub field value ?>
    			<div class="entry-thumb">
    			<?php
    			$image = get_sub_field('zdjecie', false);
    			$size = 'sydney-large-thumb'; // (thumbnail, medium, large, full or custom size)
    			if( $image ) {
    			echo wp_get_attachment_image( $image, $size );}
    			?>
    			</div>
    			<?php endwhile;
    			else :
    			// no rows found
    			endif;?>