In short
A related content block (“Further reading”, “Related guides”) offers, at the end of a piece of content or within it, three to six pages that take the topic further. The task is to choose a relevant selection rule (same topic, next step in the journey), render this block in the initial HTML with real links, and check that it suggests neither error pages nor off-topic pages. Once done, every piece of content automatically links to its neighbors, and older content keeps receiving links. This block carries part of the cross linking (see set up top-down, bottom-up and cross internal linking (opens in a new tab)). For product pages, see suggest relevant complementary products (opens in a new tab).
Why it matters
Contextual links added by hand are the most precise, but they are not enough to connect all the content on a site that publishes often: every new post pushes older ones to the back of the pagination. A related content block creates links between content on the same topic, on every page, with no writing effort.
Google states that a page receiving more internal links is seen as relatively more important, and that every page you care about should have a link from at least one other page. It also recommends <a href> links that it can crawl. A block loaded afterwards by JavaScript may be seen by Google, which renders pages, but not necessarily by other bots, including AI bots that make do with the initial HTML.
Relevance matters as much as presence. A “Recent posts” block identical on every page always links to the same five pieces of content and helps neither the reader nor internal linking. A topic-based block connects each piece of content to its real neighbors.
What it improves
- Internal linking of older content It stays linked from recent content on the same topic.
- Click depth Less content reachable only through pagination. See check click depth (opens in a new tab).
- User journeys More pages viewed per visit, measurable in Google Analytics or Matomo.
- Topic understanding Links between content in the same cluster strengthen its consistency. An indirect effect, not measurable on its own.
- AI answers Relationships between pages are easier for bots to follow. A plausible effect, not proven.
How to check
Presence in the initial HTML: the block must appear in the page source, not only in the browser's inspector.
curl -s https://example.com/blog/purger-radiateurs/ | grep -A 12 -i 'aria-label="Related articles"'
Compliant result: the list of <a href="/…"> links appears. If the command returns nothing while the block shows up in the browser, it is loaded by JavaScript.
Relevance: open twenty pieces of content at random and rate each suggested link: same topic, useful next step, or off-topic. Aim for zero off-topic links.
Link health: in Screaming Frog, in the Inlinks tab at the bottom for a target page, the block's links appear with their position. Check that none leads to a redirect, an error or a noindex page.
How to implement
Before you start
Settle the selection rule, from the most relevant to the simplest:
| Rule | Relevance | Effort |
|---|---|---|
| Manual selection by the editor (“related content” field) | Very good | High |
| Content sharing the most tags or topics | Good if the taxonomy is clean | Low |
| Content in the same category | Average | Low |
| The tool's algorithm (Jetpack, Shopify recommendations) | Variable | Very low |
| Latest published content | Low | None |
The best compromise: manual selection when available, and otherwise automatic selection by shared tags. Other rules, all of them professional conventions:
- Three to six links: beyond that, the block no longer gets read.
- The content's title as the anchor: it is descriptive by nature.
- Exclude the page itself, and pages that are
noindex, redirected, drafts or outdated. - Include the next step when there is one: the buying guide links to the service page, the tutorial to the feature. See link guides and commercial pages (opens in a new tab).
- Server-side rendering, in a
navelement with an explicit label.
WordPress
Versions WordPress 6.4 to 7.1, Jetpack plugin (November 2026 version).
With Jetpack: in Jetpack > Settings > Traffic, turn on showing related content after posts. With a block theme, the block does not appear on its own: add Jetpack's Related Posts block to the single post template (Appearance > Editor > Templates). Jetpack calculates the suggestions on its servers and caches them; use the curl command above to check that the links are indeed in the HTML served.
Without a plugin: add this code to a custom plugin or to a child theme's functions.php. Under each post, it shows four posts that share a tag or a category, cached for twelve hours:
<?php
function example_related_post_ids(int $postId, int $limit = 4): array
{
$cacheKey = "example_related_{$postId}";
$cached = get_transient($cacheKey);
if (is_array($cached)) {
return $cached;
}
$taxQuery = ['relation' => 'OR'];
$tagIds = wp_get_post_tags($postId, ['fields' => 'ids']);
$categoryIds = wp_get_post_categories($postId);
if ($tagIds) {
$taxQuery[] = ['taxonomy' => 'post_tag', 'terms' => $tagIds];
}
if ($categoryIds) {
$taxQuery[] = ['taxonomy' => 'category', 'terms' => $categoryIds];
}
if (count($taxQuery) === 1) {
return [];
}
$ids = get_posts([
'post__not_in' => [$postId],
'posts_per_page' => $limit,
'tax_query' => $taxQuery,
'fields' => 'ids',
'ignore_sticky_posts' => true,
'no_found_rows' => true,
]);
set_transient($cacheKey, $ids, 12 * HOUR_IN_SECONDS);
return $ids;
}
add_filter('the_content', function (string $content): string {
if (! is_singular('post') || ! in_the_loop() || ! is_main_query()) {
return $content;
}
$ids = example_related_post_ids(get_the_ID());
if (! $ids) {
return $content;
}
$items = array_map(
fn (int $id): string => sprintf('<li><a href="%s">%s</a></li>', esc_url(get_permalink($id)), esc_html(get_the_title($id))),
$ids,
);
return $content.'<nav aria-label="Related articles"><h2>Further reading</h2><ul>'.implode('', $items).'</ul></nav>';
});
Posts that share both a tag and a category are not ranked first: for finer relevance, add a custom field for manual selection and read it before the automatic query.
Shopify
Versions Online Store 2.0 themes, all Shopify plans, November 2026.
Blog posts: Shopify does not have a native related articles block in every theme. In Online Store > Themes > Edit code, create a related-articles.liquid snippet and call it from the article section ({% render 'related-articles', article: article, blog: blog %}):
{%- assign related_count = 0 -%}
<nav aria-label="Related articles">
<h2>Further reading</h2>
<ul>
{%- for item in blog.articles -%}
{%- if item.id == article.id or related_count >= 4 -%}
{%- continue -%}
{%- endif -%}
{%- assign shared = false -%}
{%- for tag in item.tags -%}
{%- if article.tags contains tag -%}
{%- assign shared = true -%}
{%- break -%}
{%- endif -%}
{%- endfor -%}
{%- if shared -%}
<li><a href="{{ item.url }}">{{ item.title | escape }}</a></li>
{%- assign related_count = related_count | plus: 1 -%}
{%- endif -%}
{%- endfor -%}
</ul>
</nav>
The blog.articles list is paginated: the snippet only goes through the blog's recent posts. Tag your posts carefully, as tags are the basis of the selection.
Products: the Search & Discovery app (Apps > Search & Discovery > Product recommendations) lets you choose up to ten related products and ten complementary products per product. In the Dawn theme and themes derived from it, the recommendations section is filled by a JavaScript request after the page loads: check the HTML served if you rely on these links for internal linking. The details are in the guide on complementary products.
PrestaShop
Versions PrestaShop 8 and 9.
The “Products in the same category” module (ps_categoryproducts) shows other products from the default category on the product page. Related products entered by hand on the product page (accessories or related products, depending on the version) give a more relevant selection. For the blog, most blog modules offer a related posts block: check that it is rendered server-side.
Magento
Versions Magento Open Source and Adobe Commerce 2.4.
Each product page has three native sections: “Related Products”, “Up-Sell Products” and “Cross-Sell Products” (Catalog > Products, edit the product). Related products are shown on the product page, as are up-sells, while cross-sells appear in the cart. Automatic rules exist in Adobe Commerce, not in Magento Open Source.
Drupal
Versions Drupal 10 and 11.
Create a block view (Structure > Views > Add view) on the Article content type, limited to four items. Add a contextual filter on the taxonomy term, with the default value set to the taxonomy term ID from the URL and the option to load default filters from the node page. Add a second contextual filter on the content ID, with the exclude option, to remove the current article. Place the block in the content region (Structure > Block layout).
Wix
Versions Wix Blog, Wix Editor and Wix Studio, November 2026.
Wix Blog offers a related posts section, based on categories or tags, which you can configure in the post page settings. Wix gives you no control over rendering: use curl to check that the links are in the HTML served.
Webflow
Versions Webflow CMS, site plans with CMS, November 2026.
In the collection template, add a collection list filtered on the same category as the current item, limited to four items, and exclude the current item with the dedicated filter. For manual selection, add a “Related articles” multi-reference field and connect the list to that field.
Laravel
Versions Laravel 11 to 13.
Calculate related content by shared tags, sorted by the number of tags in common:
// app/Models/Post.php
use Illuminate\Database\Eloquent\Builder;
use Illuminate\Database\Eloquent\Collection;
/** @return Collection<int, Post> */
public function related(int $limit = 4): Collection
{
$tagIds = $this->tags()->pluck('tags.id');
return Post::query()
->published()
->whereKeyNot($this->getKey())
->whereHas('tags', fn (Builder $query) => $query->whereIn('tags.id', $tagIds))
->withCount(['tags as shared_tags_count' => fn (Builder $query) => $query->whereIn('tags.id', $tagIds)])
->orderByDesc('shared_tags_count')
->latest('published_at')
->limit($limit)
->get();
}
{{-- resources/views/posts/show.blade.php --}}
@if($related->isNotEmpty())
<nav aria-label="Related articles">
<h2>Further reading</h2>
<ul>
@foreach($related as $post)
<li><a href="{{ route('posts.show', $post) }}">{{ $post->title }}</a></li>
@endforeach
</ul>
</nav>
@endif
The published() scope must be defined to suit your model. Cache the result (Cache::remember) if the calculation is expensive.
Next.js
Versions Next.js 15 and 16 (App Router).
Calculate the selection in a server component, so that it is included in the initial HTML:
// app/blog/[slug]/related-posts.tsx
import Link from 'next/link'
import { getAllPosts, type Post } from '@/lib/posts'
export default async function RelatedPosts({ post }: { post: Post }) {
const related = (await getAllPosts())
.filter((other) => other.slug !== post.slug)
.map((other) => ({ other, shared: other.tags.filter((tag) => post.tags.includes(tag)).length }))
.filter(({ shared }) => shared > 0)
.sort((a, b) => b.shared - a.shared)
.slice(0, 4)
if (related.length === 0) return null
return (
<nav aria-label="Related articles">
<h2>Further reading</h2>
<ul>
{related.map(({ other }) => (
<li key={other.slug}>
<Link href={`/blog/${other.slug}`}>{other.title}</Link>
</li>
))}
</ul>
</nav>
)
}
Do not use 'use client' with a fetch in useEffect for this block: the links would only exist after JavaScript runs.
Astro
Versions Astro 5 to 7.
In the post page, select the entries from the same collection that share a tag:
---
// src/pages/blog/[slug].astro (excerpt)
import { getCollection } from 'astro:content'
const { post } = Astro.props
const related = (await getCollection('blog', ({ data }) => !data.draft))
.filter((other) => other.id !== post.id)
.map((other) => ({ other, shared: other.data.tags.filter((tag) => post.data.tags.includes(tag)).length }))
.filter(({ shared }) => shared > 0)
.sort((a, b) => b.shared - a.shared)
.slice(0, 4)
---
{related.length > 0 && (
<nav aria-label="Related articles">
<h2>Further reading</h2>
<ul>
{related.map(({ other }) => <li><a href={`/blog/${other.id}/`}>{other.data.title}</a></li>)}
</ul>
</nav>
)}
Rendering is static: the links are in the generated HTML.
After implementation
Tip: track clicks on the block with an event in your analytics tool, without adding URL parameters to the links. A block nobody clicks is often an off-topic block.
Recrawl the site and check that older content has gained inbound links. See identify under-linked pages (opens in a new tab).
Common mistakes
- Showing the latest posts instead of related posts: the same links everywhere, unrelated to the topic.
- Loading the block with JavaScript after the page displays: bots that read the initial HTML see no links.
- Suggesting ten or fifteen pieces of content: the block no longer gets read and dilutes the links.
- A messy taxonomy: forty tags each used only once make any relevant selection impossible.
- Linking to content that is
noindex, redirected or removed: every block repeats the error on hundreds of pages. - Replacing contextual links with the block: the block complements in-text links (opens in a new tab), it does not replace them.
- Adding tracking parameters to the block's links: every link then targets a duplicate URL.
Frequently asked questions
Resources
- Google Search Central: Link best practicesdevelopers.google.com
- Google Search Central: JavaScript SEO basicsdevelopers.google.com
- Jetpack: Related Postsjetpack.com
- Shopify: Product recommendations with Search & Discoveryhelp.shopify.com
- Shopify: Liquid blog objectshopify.dev
- Astro: Content collectionsdocs.astro.build
- Next.js: Server Componentsnextjs.org
Updated on
Topic checklist (PDF)