Suggestion to Display ALT text for media
-
Hi,
I Have a suggestion to display in alt attribute for images the respective information from media, instead of filename.
Use:
$image = wp_get_attachment_image(”, $size, false, array(‘alt’ => trim(strip_tags( get_post_meta(get_the_ID(), ‘_wp_attachment_image_alt’, true) )) ));instead of:
$image = wp_get_attachment_image(”, $size, false)
- The topic ‘Suggestion to Display ALT text for media’ is closed to new replies.