How to make your thumbnail or featured image of your wordpress post to be a clickable link, so whenever you click this image, it will link you to the post itself.
This tutorial is using wordpress 3.0 and Twenty Ten theme. To follow this guide, you must already set up thumbnail with Twenty Ten theme.
If you haven’t, feel free to check my previous tutorial adding a line of code to display thumbnail for your posts.
If you done with it, let’s begin:
1. Backup database in 2 minutes.
2. Make sure you have the thumbnails displayed in your post.
3. Login to your dashboard, go to Appearance and then “editor”.
4. Copy the codes of loop.php and paste it in html editor or notepad.
5. Go to line where it says
: <?php the_post_thumbnail(); ?>
Mine it is on the line 137.
6. Replace that code with this:
<a href="<?php the_permalink(); ?>" title="<?php the_title();?>"><?php the_post_thumbnail(); ?></a>
7. Paste the codes back, click “Update file”.
8. Refresh your browser and click your thumbnail, it should bring you the related posts.