Skip to main content
The related_blog_posts HubL tag can be used to create dynamic and related blog post listing based on a variety of parameters. It allows for generating listings of posts across blogs, with the ability to filter by tags, authors, post paths and publish dates. Developers can also specify the HTML output of the module using a macro. This HubL tag can be used on both blog posts and pages. This tutorial will walk through the parameters and usage options for the blog related posts HubL tag.
Please note that the related_blog_posts HubL tag does not generate an editable module on the post/page level. Instead, it’s configured entirely with HubL.

Parameters

The list of posts is generated from a relevancy score based on a comparison of the set parameter values against posts matching these parameters, or relating to the post the HubL tag appears on. None of the parameters are required, however, specifying parameters will allow you to further control which posts are returned. For comma-separated parameters, the more values you set, the more diverse the returned listing will be. The post_formatter parameter allows you to specify a macro to generate the HTML output of the module. For a full list of parameters and example default HTML output, please see the related_blog_posts spec.
We strongly recommend using the callback parameter instead of the post_formatter parameter to ensure faster page load times.
Please note that if the related_blog_posts HubL tag is being used on a post, the blog_post_ids parameter should not be specified, as on blog posts, it will default to the post the widget is appearing on.
Below are some example ways to use this tag to enhance your website.

Display posts from a specific author across multiple blogs

In this example, we generate a listing of posts written by one of the three specified blog_authors across two different blogs.

Display posts with the tag ā€œsales enablementā€, restricted to a specific publish date time frame

In this example, we generate a listing of 10 posts related to a specific blog post, with the tag ā€œsales enablementā€, and restricted to a specific publish date time frame. This example specifies the blog_post_ids parameter, so it would be used on a page.

Display posts using a JS callback to control HTML output

In this example, we generate a listing of 5 posts using the callback parameter to control the HTML output of the post listing. (Instead of the post_formatter parameter using a macro.)
Last modified on March 29, 2026