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;?>
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.