---
title: HubL code to show the most recent blog post listing with matching tags
description: Learn how to use HubL code to display the three most recent blog posts with matching tags on your HubSpot blog post template.
---

[HTML Coding Shop HubSpot Blog](https://htmlcodingshop.com/blog)

# [HubL code to show the most recent blog post listing with matching tags](https://htmlcodingshop.com/blog/hubl-code-to-show-the-most-recent-blog-post-listing-with-matching-tags)

 Written by [Amy Andrews](https://htmlcodingshop.com/blog/author/amy-andrews) | Feb 14, 2025 7:38:11 PM

Here is a link to my [codepen](https://codepen.io/Amy-Andrews-the-typescripter/pen/MYWwpwa) that shows the HubL code that you can add to the bottom of a blog post template. It will show the 3 most recent blog posts where the tags match that of the blog post you are on. You can add your own css. I used flexbox to show them as a grid.

[View full post](https://htmlcodingshop.com/blog/hubl-code-to-show-the-most-recent-blog-post-listing-with-matching-tags)

```json
{
  "@context" : "http://schema.org",
  "@type" : "BlogPosting",
  "author" : {
    "@type" : "Person",
    "name" : "Amy Andrews"
  },
  "dateModified" : "2025-02-14T19:38:30.177Z",
  "datePublished" : "2025-02-14T19:38:11Z",
  "headline" : "HubL code to show the most recent blog post listing with matching tags",
  "image" : {
    "@type" : "ImageObject",
    "height" : 60,
    "url" : "/hs/hsstatic/content_shared_assets/static-1.4092/img/default-amp-logo.png",
    "width" : 60
  },
  "mainEntityOfPage" : "https://htmlcodingshop.com/blog/hubl-code-to-show-the-most-recent-blog-post-listing-with-matching-tags",
  "publisher" : {
    "@type" : "Organization",
    "logo" : {
      "@type" : "ImageObject",
      "height" : 60.0,
      "url" : "https://20661769.fs1.hubspotusercontent-na1.net/hubfs/20661769/dark_logo_transparent_background.png",
      "width" : 165.31604
    },
    "name" : "HTML Coding Shop HubSpot Blog"
  }
}
```