Home › Forums › General Issues › Get the image using image ID in repeater › Reply To: Get the image using image ID in repeater
Going back to the original code, there are quite a few syntax errors. Firstly, can you please read over the repeater field documentation to better understand how the has_sub_field to have_rows loops work?
I think @Jamie code will work for you, however, the sub field name looks wrong. Just change $attachment_id = get_sub_field('illustrations_image');
to your field name $attachment_id = get_sub_field('gimages');
I am amusing that gimages is your sub field name.
Perhaps you could also post a screenshot of the edit page showing the repeater field and it’s sub fields? Also, please list the correct field names.
Thanks
E
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.