This question already has an answer here:

I have the following code for calling the images in the slider but no idea on how to get the alt tag. I tried varied methods but I could be missing something. Please help. Possibly I am missing this in calling the respective variables but no idea thereof.

foreach ( get_field('images') as $image ): ?>
<img src="<?php echo $image['image']['url']; ?>" width="90" alt="<?php echo $alt; ?>" />
<?php endforeach;

Please help.

marked as duplicate by Jacob Peattie, shanebp, fuxia Dec 12 '18 at 15:28

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • @JacobPeattie It could be but I am using the _wp_attachment_image_alt tag as well but as revised the content I am hereby quoting the same that I could be wrong in calling the alt tag in any way. And that is where I need help. – Keyur Amin Dec 12 '18 at 10:44

I figured out the answer while doing some estimations. (and it was no where near to the suggested topics).


alt="<?php echo $alt; ?>"


alt="<?php echo $image['image']['alt']; ?>"

Not the answer you're looking for? Browse other questions tagged or ask your own question.