Home › Forums › Add-ons › Repeater Field › Displaying Thumbnails with Repeater field › Reply To: Displaying Thumbnails with Repeater field
Hi Elliot! After looking and playing around for a few hours I managed to make this work.
Ill post how for anyone that may be looking at this in the future.
I re-uploaded all my images to WP and into my page and changed my code to –
<!-- Masonry Images -->
<div class="masonry">
<?php if(get_field('images')): ?>
<?php while(has_sub_field('images')): ?>
<?php $image = wp_get_attachment_image_src(get_sub_field('image'), 'full'); ?>
<?php $thumb = wp_get_attachment_image_src(get_sub_field('image'), 'thumbnail'); ?>
<div class="item">
<a href="<?php echo $image[0]; ?>" class="fancybox" rel="gallery_group"><img src="<?php echo $thumb[0]; ?>" /></a>
</div>
<?php endwhile; ?>
<?php endif; ?>
</div><!-- End Masonry -->
I then used Elliots advice of change the output to Image ID and the thumbnails then displayed!
I’d like to thank Elliot for all his help and hope anyone else with this issue found this useful.
Thanks, Harry.
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.