Juliepr Similar Posts
WordPress plugin that displays three random posts from the current post's primary top-level category
by Sergei Ashmarin · github.com/sashmarin/juliepr-similar-posts · website
Install
The author publishes release zips, so WP-CLI can install straight from GitHub:
wp plugin install https://github.com/sashmarin/juliepr-similar-posts/releases/download/juliepr-similar-posts%401.0.0/juliepr-similar-posts-1.0.0.zipReadme
Juliepr Similar Posts
A small dependency-free WordPress plugin that displays three random posts from the current post's primary top-level category.
The default heading is English (Articles on a similar topic) and has a bundled Russian translation (Статьи на похожую тему).
Each result displays its featured image when available, title, and publication date in a responsive three-column layout.
Use in the Block Editor
Add the Juliepr Similar Posts block to a post. It is dynamic: on the front end it calls the same renderer as the shortcode and template function. In the block settings sidebar, optionally set Minimum publication year to show only posts published from that year onward.
Use in a theme
Add this at the end of the single-post template, inside the main post loop:
echo juliepr_similar_posts_render();
To render for an explicit post, change the heading, or limit results to a minimum publication year:
echo juliepr_similar_posts_render(
$post_id,
array(
'heading' => 'More on this topic',
'min_year' => 2020,
)
);
Use in content
Add the following shortcode to a post or a Shortcode block:
[juliepr_similar_posts]
Optional heading and min_year attributes are supported. min_year includes posts published from 1 January of that year onward:
[juliepr_similar_posts heading="More on this topic" min_year="2020"]
Category selection
The plugin selects the deepest category assigned to the current post. If several categories have the same depth, it uses the first category returned by WordPress. It then queries against that category's top-level ancestor, allowing posts in related child categories to appear.
The juliepr_similar_posts_query_args filter can adjust the underlying WP_Query arguments.
Read the full README on GitHub →
Releases
| Tag | Published | Asset | Downloads |
|---|---|---|---|
| juliepr-similar-posts@1.0.0 | Sep 2, 2026 | juliepr-similar-posts-1.0.0.zip | 0 |