I have added an alt text on my image, but it doesn't display on homepage. Is there a way to get the alt
text to display with the image without re-attaching the image, since the image was previously added on the site without alt
text.
http://prntscr.com/lenin2 http://prntscr.com/lenj0o
Thanks
The "alt" text isn't the text which is displayed - that would be the figcaption
text.
If you add a caption text directly when you insert the image (or when you edit it ) in Wordpress, WP automatically creates a shortcode that puts the image and the text into a figure
element which contains both the image and the caption text (inside a figcaption
tag).
(And if you don't add a caption text in WP's image edit box, the image is inserted without the figure
tag, as a regular img
tag. Whatever the alt
attribute in there contains, will not be displayed - it only serves for accessibility purposes or is displayed if the image is missing)
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.