Related Posts Filter to Display Tags Related to Current Blog

Hello there,
I don’t think I’m filtering this right. I created a Related Posts module and I’d like to have it populate only tags the same as the blog post itself. This is how the page looks. Which is great, I just want it to populate related posts by tag only. Not other tags.


:

 {% set current_post_tags = blog_recent_tag_posts %}
 {% related_blog_posts limit=3, no_wrapper=True, post_formatter="recent_post", tags="current_post_tags" %}

I also tried this(listed below) but the same posts pop up, which are unrelated. I also went through this doc but can’t wrap my head around it: Creating a related blog post listing with the blog related posts HubL tag - HubSpot docs

{% related_blog_posts limit=3, no_wrapper=True, post_formatter="recent_post", tags=current_post_tags %}

blog_recent_tag_posts is a function that returns an array of recent posts for a specific tag thus it can’t be used as a variable for adding tags because tags is looking for a string of comma seperated tag names (ex: “Tag 1, Tag 2”).

You’ll instead want to use the content.topic_list mapped to name and then the resulting array joined into a string. You can place this directly into the function by wrapping it in quotations and double curly brackets:

{% related_blog_posts limit=3, no_wrapper=True, post_formatter="recent_post", tags="{{ content.topic_list|map('name')|join(',') }}" %}

Thank you for your help(as always), Amwilie! I came up with an idea after posting this and it was similar to your code, except I neglected the Join method.