• Skip to primary navigation
  • Skip to main content
  • Skip to footer
  • Home
  • About
  • My Blogs
    • Photoblog
    • Knots
    • WP.com tips
kristarella.com

kristarella.com

Happiness Engineer at Automattic, lover of knitting, crochet, sci-fi and more

  • Presentations
  • Plugins
    • Exifography
  • Contact
You are here: Home / Blogging / Related or similar posts

Related or similar posts

5 July 2007 by kristarella

Easy and friendly navigation can’t be bad.

I’ve been investigating this concept of having similar or related posts being listed in the sidebar. I’ve ummmed and ahhhed over whether it’s actually useful and I’ve decided that it may be useful for some posts and for others it will be useless, mainly because those posts were fairly useless to begin with. I think anything to make navigation around a website easier and friendlier is worth a try.

So, I’ve installed the Similar Posts plugin, which seems to be fairly robust even though it’s a beta version. This plugin relates posts according to their content (and possibly their titles as well). There is another popular plugin Related Entries (for which there are a lot of outdated links for around the place). Related Entries uses the pretty permalinks and their usage of the post titles to assess relatedness, which wouldn’t be particularly useful for me because I haven’t been in a habit of giving my posts good descriptive titles.

To implement the Similar Posts plugin I put the code:
<?php if (is_single()) : ?>
<li>
<h2>Related Posts</h2>
<ul><?php similar_posts(); ?></ul>
</li>
<?php endif; ?>

in my sidebar.php (after installing the plugin of course) so that the list of related posts only appears on single post pages. It just seemed to make sense to do it that way.

Upon a bit more investigation I found a text widget that allows you to insert php code into the sidebar called ExecPHP. I probably could have used that to insert the list in the sidebar, which would save myself any troubles in the event of an update to the theme I’m using.

There’s a good chance that posts will be linked to that have very limited relatedness, but hopefully the very related ones will be identified as well. 🙂

Share this:

  • Share on Facebook (Opens in new window) Facebook
  • Share on X (Opens in new window) X

Like this:

Like Loading…

Related

Filed Under: Blogging, WordPress Tagged With: tools

Footer

Subscribe to Blog via Email

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Categories

%d