images missing ALT text

This topic contains 2 replies, has 2 voices, and was last updated by depad depad 6 years, 2 months ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #8382
    depad
    depad
    Participant

    Hi Ernest,

    it seems like your plugin does not add ALT text and title to the thumbnail images of Realted Post Pro. Where can I find the line of code which inserts the image into the related posts ? I want to add ALT and title manually.
    Perhaps you can add this in the next version ?
    Thanks for your help…

    Best Regards,
    Markus

    #8388
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi Markus,

    Indeed, because the image URLs are acquired in the process, the ALT text is not. I will note this and do a research on how to get this information if possible.

    The image information is printend within the related-post-pro/includes/views/rpp.shortcode.php file on line 169:

    
    <img src='<?php echo $rpp_post->image; ?>'/>
    

    What I suggest, is to put the post titles as the alt value, so changing that to something like:

    <img src='<?php echo $rpp_post->image; ?>' alt='<?php echo $rpp_post->title; ?>'/>

    That’s probably the best solution I can come up with right now.

    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


    #8403
    depad
    depad
    Participant

    Hi Ernest,

    many thanks for helping me. The same thing is in the next line of the same document where you add the link:
    don’t forget the title attribute! Like this:
    url; ?>’><?php echo $rpp_post->title; ?>
    changes to
    url; ?>’ title='<?php echo $rpp_post->title; ?>’><?php echo $rpp_post->title; ?>

    Its better for SEO 😉

    Best Regards,
    Markus

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.