Easy Guide to Display Related Posts by Same Author in WordPress

In this tutorial, we will learn how to display related posts by same author in WordPress.

Method 1: Display Related Posts by Author in WordPress Using Plugin

This method is easier and is recommended for all users.

First thing you need to do is install and activate the Similar Posts plugin. For more details, see our step by step guide on how to install a WordPress plugin.

Upon activation, you need to visit Settings » Similar Posts page to configure plugin settings.

Related Posts by Same Author in WordPress

The settings page is divided into different tabs, and you will land on the General tab by default. You can review the options and change them to match your requirements.

On this page, you need to scroll down to the bottom and select ‘Yes’ next to ‘Match the current post’s author’ option. You can uncheck other matching options to make sure that the plugin only fetches posts by author.

Related Posts by Same Author in WordPress

Next, you need to switch to the ‘Placement’ tab and activate ‘Output after post’ option. You can also edit output template by editing the text in the ‘Parameters’ box.

Related Posts by Same Author in WordPress

Don’t forget to click on the ‘Save Settings’ button to store your changes.

You can now visit any single post on your website, and you’ll see related posts by the same author after the post content.

Related Posts by Same Author in WordPress

Method 2: Manually Display Related Posts by Same Author in WordPress

This method requires you to add code to your WordPress theme files. If you haven’t done this before, then check out our guide on how to copy and paste code in WordPress.

You will need to add the following code to your theme’s functions.php file or in a site-specific plugin.

function wpb_related_author_posts($content) {
 
if ( is_single() ) { 
    global $authordata, $post;
     
    $content .= '

Similar Posts by The Author:

‘; $authors_posts = get_posts( array( ‘author’ => $authordata->ID, ‘post__not_in’ => array( $post->ID ), ‘posts_per_page’ => 5 ) ); $content .= ‘

‘; } $content .= ‘

‘; return $content; } else { return $content; } } add_filter(‘the_content’,’wpb_related_author_posts’);

You can now visit any single post on your website, and you’ll see related posts by the same author below the content.

Related Posts by Same Author in WordPress

We hope this tutorial helped you learn how to easily display related posts by same author in WordPress.