get most recent posts based on a topic

I am trying to pull recent blog posts on a blog post itself where the topic is the same one as the current topic.

what is the best solution to do that?

Hi @Robert

You can do this through the topic recent posts filter available here: HubL functions - HubSpot docs

Hope this helps!

@Tom - how can this be extended to a multiple blog listing?

{% set blog_one_posts = blog_recent_posts('XXXXXXXXXX', limit=3, tags="Marketing Tips") %} <!-- video --> 
{% set blog_two_posts = blog_recent_posts('XXXXXXXXXX', limit=3, tags="Marketing Tips") %} <!-- article -->
{% set blog_three_posts = blog_recent_posts('XXXXXXXXXX', limit=3, tags="Marketing Tips") %} <!-- infographic -->
{% set blog_four_posts = blog_recent_posts('XXXXXXXXXX', limit=3, tags="Marketing Tips") %} <!-- report -->

{% set all_posts = (blog_one_posts + blog_two_posts + blog_three_posts + blog_four_posts) | sort(true, false, 'publish_date') %} 

Then

{% for post in all_posts %}
Content here
{% endfor %}

Hey @sking1 this is somewhat different to this original issue. I’d advise you to open up a new post on our designers community to see if any designers there can assist!

Thanks @Tom. I posted it here: https://community.hubspot.com/t5/Content-Design-Questions/Filter-one-topic-in-a-multiple-blog-listing/m-p/216830#M9726