How can i add to my code
<img src="<?php the_sub_field('img'); ?>" alt="????" />
Te “alt” value of the image in my media, form my wordpress.
How can i add to my code
<img src="<?php the_sub_field('img'); ?>" alt="????" />
Te “alt” value of the image in my media, form my wordpress.
You must be logged in to post a comment.
Advanced Custom Fields gives you a choice of return values. Given your current code I’d guess you’ve gone with URL.
In order to display the ALT tag you’ll need to choose object instead. ID could work too but it’s adding an extra step.
After choosing the new return value replace your code with: