I was reading some blogs today, and noticed that the “Related Posts” feature was actually quite handy. I found some related articles that I was actually interested in reading. With that in mind, I decided to add this feature to my blog. There are actually many options available for this type of task. That’s what’s so awesome about WordPress: there are so many plugins available. And though I haven’t yet tried, I’m sure that writing one is a cinch, too. Anyway, I chose one of the plugins and activated it. Setup took 2 seconds. But it wasn’t quite right.
It didn’t have a heading above it. That’s just simple HTML: I went and edited my template so that “Related Articles” appears above the list. Another issue was that the links had titles with the prefix “Permanent Link: “. In my opinion, that’s a given for my URLs. So I went into the PHP file, and removed that redundancy. Also, it continued to list 5 bullet points, even if less than 5 related posts were found. This is what I changed to fix that (if you’re looking at the plugin’s code, I think you can see what this means):
if ($title) {
$output .= $before_title .'<a xhref="'. $permalink .'" rel="bookmark" title="' . $title . '">' . $title . '</a>' . $after_title;
}
Maybe this will help someone out there.
Reflection: This even helped myself as reference later on, when I upgraded the plugin as part of my WP 2.0 upgrade project.
- Psychic Search Breaks K2
- Grab the Latest Post from Multiple WordPress Blogs
- Plugin Upgrades for the New Year
- WordPress: Show More Posts on Archive Pages
- vBulletin Edit Titles
- YouTube where Mike Huckabee’s young Iowa spokesman endorsed Ron Paul, “by mistake”
- Votio to Poll for Your Favorite Posts
- Deleting Different Posts Per Page and other plugins
- Brain Apps on the Google App Engine
- Forums (hosted)
» WordPress: Show More Posts on Archive Pages
» Google Video HTML in WordPress Posts
» Votio to Poll for Your Favorite Posts
» New Layout


