Home › Forums › General Issues › Repeater image id › Reply To: Repeater image id
Hi
I’m not sure what you code is doing, so forgive me if this is off key but I think you want something like this:
while( have_rows('repeater_field_name') ): the_row();
$attachment_id = get_sub_field('your image field'); $imageS = wp_get_attachment_image_src( $attachment_id, 'thumbnail' );
$imageF = wp_get_attachment_image_src( $attachment_id, 'full' );
?>
<a href="<?=imageF[0];?>"><img src="<?=imageS[0];?>"></a>
<?php
endwhile;
James
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.