Five days, five new features: Adding ‘Related Posts’ on Day 2

Yesterday, I added in the All-in-one-SEO-pack plugin for WordPress.  A relatively simple kickoff to my five days, five new features series I’m running this week to get myself back on the wagon with blogging.  Or is off the wagon.  I get those confused all the time, so who knows.

Today, I’m going to adding a list of related posts on the single post page of this WordPress blog.  If this works correctly – and you are looking at the single post version of this page (not the index, archive, or search result pages) you should a list below that shows 3 posts that you might also find of interest.  I’m utilizing the Similar Posts plugin to power this list.  There’s many plugins that will easy give your blog the same functionality, but I like the Similar Posts plugin because you can fine-tune how “post similarity” is defined using post titles, content, and tags.  Many related post plugins simply use tags.

Once you install the plugin, it’s a simple matter of inserting the function into your theme …

<?php //simlilar posts listing
if (function_exists(‘similar_posts’)) { ?>
<div id=”similar-posts”>
<h3>You may also like:</h3>
<?php similar_posts(); ?>
<?php } ?>

….and then add some styling the list it generates.  You can do both of these tasks directly in the admin panels for the plug-in or in your PHP and CSS files for your theme.  I also like that the configuration options allow you to easily filter out categories and authors.

This website uses IntenseDebate comments, but they are not currently loaded because either your browser doesn't support JavaScript, or they didn't load fast enough.

Post a Comment

Your email is never published nor shared. Required fields are marked *