The following tutorial illustrates how to add Related Post entries to your WordPress blog. This is done in conjunction with the Ultimate Tag Warrior plugin. If you aren’t already using Ultimate tag warrior, I highly recommend adding it to your plugin list. There are so many awesome advanced features this plugin has to offer other than just displaying plain keyword tags. Anyhow, on with how to add Keyword Related Posts to your WordPress entries.
Adding Keyword Related Posts to WordPress entries:
This tutorial assumes that you already have Ultimate Tag Warrior installed and have Keywords in use. If not, please Download, install, and activate the “Ultimate Tag Warrior fin” plugin.
- From your WordPress administration panel, navigate to Design -> Theme Editor then locate and select Single Post (single.php) from the theme list.
- On it’s own line, just before the following code:
- Click Update File and go view your site.
<?php comments_template(); ?>
<?php UTW_ShowRelatedPostsForCurrentPost(“posthtmllist”, “”, “4”); ?>
The number 4 within the code determines how many related posts are displayed.
The relevant Keywords you have tagged for each post, determines which posts display as related to the current post. You can optionally create a utwrelatedposts class entry in your style.css to further customize the styling of the related posts.