Support » Plugin: WP Featured Content Slider » Add alt text to images

  • Think this would be a good addition to the script, mostly to help things validate. Here is what I have added that gives me the alternate text for the image:

    $img_id = get_post_thumbnail_id($post->ID); // This gets just the ID of the img
    $alt_text = get_post_meta($img_id , '_wp_attachment_image_alt', true); // This get the Alt Text

    Then add this to the img line:
    alt="<?php echo $alt_text; ?>"

    http://wordpress.org/plugins/wp-featured-content-slider/

  • The topic ‘Add alt text to images’ is closed to new replies.