Related Posts Plugins are very popular as a method for WordPress users to display related content at the end of their posts, providing the reader with additional relevant content. Typically, related posts plugins use Post Tags to compare posts and find those that are related to the currently displayed post. The problem with this method is that it doesn’t work for any post type that doesn’t use Post Tags or that has custom taxonomies.
This plugin will provide a function that will allow you to display 4 posts that are related to the currently viewed post. By default it will display posts that share similar Post Tags, but by passing a parameter to the function, you can also display posts that are related by a custom taxonomy.
To display the related posts, place this inside your single.php loop:
This will display an unordered list of four related posts.
If you want to display posts related by a custom taxonomy, such as “Genres”, then you can do this: