What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
To show more articles by the current post’s author, run a second WordPress query for that author, exclude the current post, and render the results where you want them to appear. You can append the list to post content with a PHP snippet, or use a plugin if editors need to control the selection and layout without changing code.
Display same-author posts with a PHP snippet
The basic approach is to use get_posts() or WP_Query with the current author’s numeric user ID. Exclude the current post using post__not_in, and set a deliberate result limit with posts_per_page. WordPress documents these and related query parameters, including author, post type, taxonomy filters, exclusions, and ordering: WP_Query.
For a simple list appended to the content of a single post, adapt this example in a child theme’s functions.php or a code-snippet manager:
function itg_related_author_posts( $content ) {
if ( ! is_single() || ! in_the_loop() || ! is_main_query() ) {
return $content;
}
$current_post_id = get_the_ID();
$author_id = (int) get_post_field( 'post_author', $current_post_id );
$related_posts = get_posts( array(
'author' => $author_id,
'post__not_in' => array( $current_post_id ),
'posts_per_page' => 5,
'post_type' => 'post',
'orderby' => 'date',
'order' => 'DESC',
) );
if ( empty( $related_posts ) ) {
return $content;
}
$author_name = get_the_author_meta( 'display_name', $author_id );
$html = '<section class="related-author-posts">';
$html .= '<h2>' . esc_html( sprintf( 'More posts by %s', $author_name ) ) . '</h2>';
$html .= '<ul>';
foreach ( $related_posts as $related_post ) {
$html .= '<li><a href="' . esc_url( get_permalink( $related_post->ID ) ) . '">';
$html .= esc_html( get_the_title( $related_post->ID ) );
$html .= '</a></li>';
}
$html .= '</ul></section>';
return $content . $html;
}
add_filter( 'the_content', 'itg_related_author_posts' );
This uses the post author ID rather than a display name, so it does not depend on how the author’s name appears publicly. The query requests up to five standard posts, newest first, and skips the current post. The loop and main-query checks help avoid adding the list to secondary content renderings.
#1 Best Overall
Choose where the list appears
The the_content filter appends the list after the post body wherever the theme renders that content. If your theme has a dedicated template part or hook for a post footer, placing the output there can provide more precise positioning and avoid relying on content filtering. Make sure the placement is inside the single-post template and only runs once.
Adjust what WordPress considers related
“Same author” can be the only condition, or one part of a narrower match. Change the query to reflect what readers should see:
Rank #2
- Show only a particular content type: Keep
'post_type' => 'post'for blog posts, or set it to a registered custom post type. WordPress query parameters also allow an array of post types. - Require a shared category: Add a category constraint such as
'category__in' => wp_get_post_categories( $current_post_id )when the current post’s categories should also be required. Consider how uncategorized posts should behave. - Require a shared tag: Add a
tag__inconstraint using the current post’s tag IDs. Taxonomy constraints narrow the author’s results; they do not replace the author condition. - Change the selection order: Keep
orderbyandorderaligned with the goal. Newest-first is useful for recent coverage; a different ordering may be appropriate for another editorial use. - Change the number shown: Set
posts_per_pageto a small, intentional limit rather than displaying every matching post.
For author queries, use the numeric user ID with author when available. The alternative author_name parameter expects the user’s nicename, not the display name shown to readers. Keep post__not_in as an array of integer post IDs; WordPress documents that post__in and post__not_in cannot be used together, and a comma-separated string is not a substitute for the required array.
Add the code safely and verify the result
- Choose a deployment method. Put theme-specific code in a child theme rather than a parent theme, so a theme update does not overwrite the change. A snippet manager is another option if that fits your site’s maintenance practices.
- Check the query choices. Confirm the author ID, post type, exclusion, result limit, filters, and ordering match the intended behavior.
- Test representative posts. View posts by authors with several published articles, authors with only one article, and posts whose categories or tags vary. Confirm the current post never appears in its own list.
- Check markup and placement. Verify that the section appears once, below the intended content, and that links and headings make sense with your theme’s styles and screen-reader navigation.
WPBeginner’s February 13, 2025 tutorial describes the same general content-filter approach and recommends WPCode as a way to add the PHP snippet without editing functions.php: WPBeginner’s same-author posts tutorial. Regardless of how you install the code, review it against your site’s theme and deployment process before enabling it.
When a plugin is a better fit
Use custom code when you want a small, predictable list and are comfortable maintaining a query and its markup. A plugin is a better fit when nontechnical editors need controls for placement, layout, selection, or filtering.
| Approach | Best fit | Considerations |
|---|---|---|
| Custom PHP query | A defined same-author list with site-specific placement and markup | Requires code deployment and upkeep; the site owner controls the query and output. |
| Related Posts By PickPlugins | Sites needing options such as author-archive placement, custom post types, manual selection, ordering, taxonomy filters, list/grid/slider layouts, or shortcode output | Review its settings, generated markup, compatibility, and performance against the site’s requirements. Details are listed on the WordPress.org plugin page. |
| Custom Related Posts | Sites needing configurable author, date, or excerpt fields, search, relation caching, or self-reference controls | Check the plugin’s current features and compatibility information in its WordPress.org listing and changelog. |
Before choosing a plugin, check whether it supports the site’s current WordPress version and required post types, and assess its caching behavior, accessibility, markup, and ongoing maintenance. If you use a shortcode or widget, confirm that it can query by the current author rather than requiring manual selection for every post.
Quick Recap
Best Value
Rank #4
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

