Image Link WordPress Plug-in

The theme (look and feel) used for Sterling Adventures has been developed with lots of love and care! Although it probably still isn’t anywhere near perfect (or even working in some places – software is never bug-free), but I am fairly proud of it. 😳 So, I think some of it is now at a point where it’s worth shouting about, and possibly sharing…

One aspect of the look and feel is having a thumbnail image in the excerpt shown on the index page. There isn’t any rocket science here – it’s simply up to the post author to provide the image (and text) in the optional excerpt in WordPress’ write a post form. However, the “trick” bit is to make that thumbnail image a hyper-link to the post. I’ve done this with a simple WordPress plug-in called ‘Image Link‘. This is available as a download here.

All I ask is that you leave your greeting card here (i.e. leave a comment 😯 ) and credit the widget (i.e. include a link to this page) on your blog.

:star: Why not check out my other WordPress plugins too! :star:

Instructions:
Just put the plug-in into your plug-in directory (if this doesn’t make sense it probably isn’t something you should be trying 🙂 ) and activate it. Any excerpts with images (using <img /> tags) will have the image wrapped up as a hyper-link to the post’s permalink. Making them clickable…

With great regret I have closed comments on this post as I’m being deluged with queries that often boil down to “how to” requests and not issues with the plug-in, which works perfectly! 🙂 So, if you want support, even advice, use the Feedback link and ask away…

But please note I will ask for a donation before I’ll look at “how to” questions, I can’t teach PHP programming for free.

Version History:

  • 0.2 – Released to the WordPress community.
  • 0.1 – Initial version.

Series - WordPress Plug-ins

  1. Image Link WordPress Plug-in
  2. Last Year WordPress Sidebar Widget Plugin
  3. Simple Archive Plugin
  4. Avatars Plugin
  5. WordPress Post Country Plugin
    (with premium Google Mapping)
  6. Notices Ticker Plugin
  7. Comments with Avatars
  8. Simple WordPress Twitter Plugin
  9. WordPress Post Grouping Plugin
  10. WordPress Mapping Plugin

14 thoughts on “Image Link WordPress Plug-in”

  1. hi! heard good comments about your plugin 😀
    but I follow the instructions but dunno what went wrong too, it does not seem to be working for me as well.
    And another question, how do i create img thumbnails? Thanks.

  2. Denis, thanks! It is a simple but very useful plug-in huh!

    Anyway, regards your problem –
    The plug-in simply wraps <IMG … /> mark-up found in the excerpt in a hyper-link (i.e. <A … ><IMG … /></A>) so any issues with ALT properties, which are part of the <IMG … />, must already be there. Deactivate the plug-in and you’ll see it is still invalid. That is, this is not a problem with the plug-in. Take at look at your post, you need to add ALT=’…’ to your <IMG … /> mark-up.

    Good luck!

  3. Hi Pete,

    thanks for your quick answer 🙂 !

    Is it possible to put an ALT=”” into you plugin that contains the the the same as TITLE=”” ? that would be great.

    I tried it that way, but it doesnt work.

    Cheers
    Denis

  4. Denis, I don’t think you understand, you don’t need (it isn’t allowed or part of the standard) an ALT in the <A> mark-up, it goes in the <IMG> markup – which is wrong in your post! This is nothing to do with the plug-in…

  5. Hi Pete,

    i know that it got nothing to do with the plugin. I just want to expand your plugin so that i dont have to put the ALT in the tag by myself. I looked your code and saw that you creat the title like that:

    title= . $post->post_title . so i thought i could put something like alt= . $post->post_title . into the code. But that causes even more errors 🙁

    the thing is that i want the alt tag created automatic from post just like you did for the title.

    the plugin works totally fine, i only want to put the alt automatic in the code.

    cheers
    denis

  6. Sorry, from my perspective, it would be wrong for the plug-in to alter the <IMG … > mark-up that comes directly from the content of posts authored in WordPress – they may well (should) already have detailed ALT properties etc. set…

  7. Dear Pete,

    I use your plugin on my website and it works great.
    Since I’m using livewriter to post my blogs, I modified the plugin so that the thumbnail in de “content” teaser are linked to the post.
    But now off course, all the images in my post linked to the post.
    Not a big problem, but maybe there is an easy way to modify the plugin, that just the first picture of the post would be linked ?

    Because I’m a php dummy, can you help me?

    Best regards,

    Non

Comments are closed.