Yesterday, after reading a forum entry on CMF about LinkWithin, I immediately went and installed it on my site just to test and see if it worked as discussed by the forum members. The plugin seemed fine with the only two issues I have is that Linkwithin has a link back to it’s own site and on top of that, it wasn’t being distributed on WordPress.org.
For those of you like me, who are not at ease on using plugins not found on WordPress.org’s repository of open source plugins, Archon Digital created a cutomized template for Yet Another Related Post Plugin or YARPP by mitcho (Michael 芳貴 Erlewine). Since version 3.0, the YARPP plugin allows custom templates as described in this post.
I’ve been using YARPP for such a long time now that I actually just forgot about it and ignored it altogether. All this time I knew there were ways to customize the template and style it with CSS but for some reason, since the plugin just worked well for me, I left it like the way it was when I first installed it.
It seems a major part of what makes the Linkwithin plugin perform so well on blogs is that it displays your related posts along with thumbnails using their own proprietary way of weighing which posts are relevant. To achieve something similar I had to create a template that uses timthumb.php to generate the thumbnails for me using a custom field I am already using extensively on my blog.
Timthumb was an image-resize script created for Mimbo Pro and was eventually released by Darren Hoyt as open source. It is for me one of the best scripts or plugins created to help theme authors to simplify the generation of post thumbnails. Archon Digital uses the timthumb script extensively on this site.
- YARPP. In case you haven’t yet, install the plugin YARPP and set the Display options to display using a custom template file as seen on the image below.
- Timthumb. Download the timthumb script. Copy it to your existing theme folder.
- Cache folder. create a folder called cache inside your existing theme folder and set the permissions to 755 or 777 via your ftp software.
- Default image. create an image and save it as default.jpg and upload it to your existing theme folder. This will be the default image in case your post still has no thumbnail assigned to it.
Create a custom PHP file “yarpp-template-post-thumbnail.php”
Copy and paste the following code to notepad or any text editor and the save file as “yarpp-template-post-thumbnail.php” inside your current theme folder
Copy the CSS
Add the following css to your theme’s stylesheet or download text file here.
Set your YARPP options
Go to your YARPP options panel and follow as illustrated below
Timthumb and custom fields
The template file has refers to a custom field called thumbnail for the timthumb script to work. The thumbnail custom field would require your image’s full URL as its value.
In case you are already using timthumb on your theme then you will only have to edit the template file to match your own custom field. Simply edit the word ‘thumbnail’ on line 9 of the template (see image above).
Still, Linkwithin is a great and effective plugin for bloggers who want a significant improvement on their bounce rates and to those who would want a good related post plugin for WordPress. Definitely, YARPP is better but I think Blogger users would find LinkWithin more useful as it greatly increases the interactivity and it’s very simple to implement.