I’m trying to access the caption and description of my custom image field, and can’t seem to get to it. I have created a template that changes the image source of a thumbnail to display the main image. I would love to display a caption under that, but can’t seem to figure it out.
Hi @jmtaha,
Set the ‘return value’ option for your image field to ‘Image Array’. Then access the caption and description for the selected image in your image field as shown below:
$image = get_field('image_field_name);
echo $image['caption']; // image caption
echo $image['description']; // image description
Have a look at the docs >> Image field for more info.