Support

Account

Home Forums Add-ons Repeater Field Getting Alt Text to show up in Image Field Reply To: Getting Alt Text to show up in Image Field

  • change the return value to image array (or object) then change every instance in the original code is getting the image field so that the values are not formatted

    example change get_sub_field('image') to get_sub_field('image', false)

    this will preserve the all of the original code with the minimum amount of alteration and allow you to use the full image array.

    Then to add your additional code you can get the field again in the original way.

    Either that or use

    
    $alt = get_post_meta(get_sub_field(image), '_wp_attachment_image_alt', true);
    

    to get the alt text for the image