CodeCanyon

Manual Related Posts

Manual Related Posts

Manual Related Posts is a plugin that allows you to manually specify related posts, rather than use a algorithm.

Pages and any Custom Post Type that you’ve defined will also work. You can also relate Posts to Pages and visa versa.

Once activated, this plugin adds a meta box to the Add/Edit Post screen where related posts can be chosen.

There is no limitation to the number of related posts you can have for any one post, and un-relating a post again is simple – un-select the related entry and update the Post.

  • Shortcode support
  • Filtering is supported if you have a large list to pick from.
  • Multi language support including US, GB, FR, DE, NL, IT, ES and RU.
  • Pages and Custom Post Types work in the same way.

Displaying related posts, pages or custom post types is easy. There are two options:

  1. Call Manual Related Posts within The Loop. This will display all related posts for each Post (if any).
  2. Call Manual Related Posts outside The Loop, in sidebars, footer areas or anywhere you want by passing a Posts ID. This will display all related posts for a specific Post (if any).

Pages and Custom Post Types work in the same way.

Manual Related Posts will not output any headings above your related posts, pages or custom post types. This is up to you, so you have full control over the look and feel.

Please view the screenshots for examples. Alternatively post a comment with any questions you have. Feature requests also accepted.

Code Examples

In your templates, use these examples to list the related posts for the current post or a specific post:


<?php
/* Specific Post (pass the Posts ID) */
foreach(fcnGetManualRelatedPosts($post_id) as $pid) :
    echo '<li><a href="'.get_permalink($pid).'">'.get_the_title($pid).'</a></li>';
endforeach;
?>

<?php
/* Current Post */
foreach(fcnGetManualRelatedPosts() as $pid) :
    echo '<li><a href="'.get_permalink($pid).'">'.get_the_title($pid).'</a></li>'; 
endforeach;
?>

<?php /* Get Excerpt */ ?>
<h2>Related Posts</h2>
<ul>
    <?php foreach(fcnGetManualRelatedPosts() as $id) : ?>
    <li>
        <a href="<?php echo get_permalink($id); ?>"><?php echo get_the_title($id); ?></a>
        <p><?php echo fcnGetManualRelatedPostExcerpt($id); ?></p>
    </li> 
    <?php endforeach; ?>
</ul>

<?php
/* The default excerpt length is 55 words. You can now take control of this by passing a second parameter. Example: 30 words. */
echo fcnGetManualRelatedPostExcerpt($id,30); 
?>

<?php
/* Display a related posts thumbnail */
foreach(fcnGetManualRelatedPosts($post_id) as $pid) :
    echo get_the_post_thumbnail($pid,array(100,100));
endforeach;
?>

<?php
/* Get total related posts before calling fcnGetManualRelatedPosts() */
echo fcnGetTotalRelatedPosts();
?>

<?php
/* Get total related posts for specific post (pass the Posts ID) before calling fcnGetManualRelatedPosts() */
echo fcnGetTotalRelatedPosts($post_id);
?>

[manual_related_posts post_id="4" title="Some Title"]

Installation

  1. Upload the Manual Related Posts plugin folder to the plugins directory (/wp-content/plugins/) by the Wordpress plugin Uploader or by FTP
  2. Activate
  3. Add or Edit a post and relate posts.

Latest Version

Latest version is 2.3.

by
by
by
by
by
by