I’ve noticed a lot of people using LinkWithin to display related posts at the end of each entry. It looks great, but I had a few concerns about using it on Making it Lovely. The stats would get thrown off a bit when using the widget because all of the referring links are shown as coming from LinkWithin. I also wanted something self-hosted for more control (*ahem*), and something that could be cached to avoid slowing down the site.
I decided to go with Yet Another Related Posts Plugin.
Hooray, it’s self-hosted! And it doesn’t throw off my referring stats! And it caches and works well in conjunction with WP Super Cache! And it’s totally customizable! It even adds related posts to your RSS feed if you so choose. Nice.
The default display is simply an ordered list. That’s fine for the RSS feed, but I wanted a layout with thumbnail images similar to the standard LinkWithin widget. So then I started playing around with it to make it look nice…
I quickly realized that I’d have to enable the thumbnail feature that was introduced in WordPress 2.9x. And then go through each of my posts and set the thumbnail, which I had been doing manually. OK. It’s a lot of work, but I can do that. I’m thorough (and compulsive) enough.
Then I began working on a custom template, delving into the PHP.
I got the thumbnails to show up! Hmm, but they were lined up vertically. So then I had to create a table-style layout, using CSS.
The automatic placement stuck the related posts right at the end of each single post’s content, but I wanted to move it down a little. Fortunately, this was fairly easy. I just turned off the automatic placement and inserted a line of PHP into my single.php template of my theme.
OK, pretty good. But now let’s cut to approximately three months later when it is still bothering me that the text underneath each thumbnail does not play nicely with the layout when it’s too lengthy. #$@&!. Of course it’s been so long that I don’t remember all of the work I had already done up until this point, so I have to refamiliarize myself with the CSS syntax that I set up.
But I finally finished!
And you know what? Maybe you would have noticed or maybe not. Maybe I spent hours upon hours, spread out over months working on something that would only make me happy, but I’m fine with that. I’m glad that I was able to really tweak the whole thing to get it exactly to my liking, even if it did take forever. I love a good coding challenge.