A simple 'related posts' plugin that lets you choose the related posts yourself instead of generating the list automatically.
Option 1 - Automatic install
Use the plugin installer built into WordPress to search for the plugin. WordPress will then download and install it for you.
Option 2 - Manual install
How to display the related posts on your website
The related posts are displayed by adding
<?php echo $related->show($post_id); ?>
to your template. Replace $post_id with a post ID. If you call it within the WordPress loop, you can use
<?php echo $related->show(get_the_ID()); ?>
You have the option of either outputting a pre-formatted list or returning a PHP array of related posts to customise the markup yourself.
Examples
Example 1: Using the default output
<?php echo $related->show(get_the_ID()); ?>
This can be called within the WordPress loop. It will output a <ul> list with links.
Example 2: Returning an array
<?php $rel = $related->show(get_the_ID(), true); ?>
With the second argument set to true, it will return an array of post objects. Use it to generate your own custom markup. Here is an example:
<?php
$rel = $related->show(get_the_ID(), true);
// Display the title of each related post
foreach ($rel as $r) :
echo $r->post_title . '<br />';
endforeach;
?>
Requires: 2.9 or higher
Compatible up to: 3.2.1
Last Updated: 2011-9-21
Downloads: 8,452
Got something to say? Need help?