Support

Account

Home Forums General Issues Get the image using image ID in repeater Reply To: Get the image using image ID in repeater

  • Hi @evanrichards

    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