In its simplest form, related posts are a list of posts displayed within, after, or aside from the current post a visitor is reading. The relationship between those posts and the one currently being read can vary greatly.
We allow users to use our Query loop block to create simple relationships. ie. by author, by taxonomy, or by hierarchy. We’ll introduce some examples of parameter settings in this article.
Related Posts by same author
For multi-author sites, it’s quite common to include at the end of the post, or in a sidebar, a list of other posts by the same author. This parameter set will do exactly that whilst making sure we don’t see a duplicate of the current post.
Related Posts by same taxonomy (category, tag, etc.)
A simple, lightweight, and effective related posts method is to use taxonomies to form the post relationships. And this is probably the most sought-after feature. Try these parameters to display posts that share the same category terms.
Related Posts by hierarchy
For pages and other post types that support hierarchies, displaying a list of child posts on the post parent is a good way to provide users with a handy index. This can be achieved with this super simple parameter set.
Related posts including categories, excluding tags
In this example, we will be showing posts that share the same category terms as the current post, along with posts in the Featured category. But at the same time, we want to exclude any posts that share the same tags. For example, we are reading a post in the category of Electric Cars with the tag Toyota. In our related posts, we expect to see more posts on electric cars but perhaps from a different manufacturer.