WordPress.org

Ready to get started?Download WordPress

Forums

Smart Post Lists Light
[resolved] featured image alt tag (3 posts)

  1. sarahkim
    Member
    Posted 1 year ago #

    I like this plugin and works perfectly but when I test for usability test, alt tag of all featured images are missing..
    I looked up the splw.php file, I think there is no alt tag php code.

    // Get the Post's Featured Image data
    $image_url = wp_get_attachment_image_src($attachment_id, $size);
    $result = 'ID) . '"><img src="' . $image_url[0] . '" class="smart-post-list-image">';

    please help me. I'm not good at php coding..

    http://wordpress.org/extend/plugins/smart-post-lists-light/

  2. OTWthemes
    Member
    Plugin Author

    Posted 1 year ago #

    Hi sarahkim,

    No alt tag is included in the php code. We might include this as an update in future but I can't really tell a release date.

    You can try changing this
    <img src="' . $image_url[0] . '" class="smart-post-list-image">';
    with
    <img src="' . $image_url[0] . '" class="smart-post-list-image" alt="ALT_TAG_TEXT_GOES_HERE">';

    Note that any changes you make on the code will be lost once you update your plugin.

    OTWthemes

  3. sarahkim
    Member
    Posted 1 year ago #

    Thank you so much!!
    It works well
    The code was not hard than I thought anyway, like html :-)

    Regards
    Sarah

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic