<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Related Posts Filter to Display Tags Related to Current Blog in CMS Development</title>
    <link>https://community.hubspot.com/t5/CMS-Development/Related-Posts-Filter-to-Display-Tags-Related-to-Current-Blog/m-p/742107#M32335</link>
    <description>&lt;P&gt;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.&lt;/P&gt;</description>
    <pubDate>Mon, 16 Jan 2023 20:41:16 GMT</pubDate>
    <dc:creator>unicorndev</dc:creator>
    <dc:date>2023-01-16T20:41:16Z</dc:date>
    <item>
      <title>Related Posts Filter to Display Tags Related to Current Blog</title>
      <link>https://community.hubspot.com/t5/CMS-Development/Related-Posts-Filter-to-Display-Tags-Related-to-Current-Blog/m-p/741377#M32310</link>
      <description>&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;Hello there,&lt;BR /&gt;&lt;BR /&gt;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.&lt;BR /&gt;&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screen Shot 2023-01-13 at 3.23.52 PM.png" style="width: 400px;"&gt;&lt;img src="https://community.hubspot.com/t5/image/serverpage/image-id/83041iF0044942609E6B97/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Screen Shot 2023-01-13 at 3.23.52 PM.png" alt="Screen Shot 2023-01-13 at 3.23.52 PM.png" /&gt;&lt;/span&gt;:&lt;/DIV&gt;&lt;PRE&gt;          {% set current_post_tags = blog_recent_tag_posts %}
          {% related_blog_posts limit=3, no_wrapper=True, post_formatter="recent_post", tags="current_post_tags" %}&lt;/PRE&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;BR /&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;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:&amp;nbsp;&lt;A href="https://developers.hubspot.com/docs/cms/guides/creating-a-related-post-listing" target="_blank" rel="noopener"&gt;https://developers.hubspot.com/docs/cms/guides/creating-a-related-post-listing&lt;/A&gt;&lt;/DIV&gt;&lt;PRE&gt;{% related_blog_posts limit=3, no_wrapper=True, post_formatter="recent_post", tags=current_post_tags %}&lt;/PRE&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Fri, 13 Jan 2023 20:27:08 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/Related-Posts-Filter-to-Display-Tags-Related-to-Current-Blog/m-p/741377#M32310</guid>
      <dc:creator>unicorndev</dc:creator>
      <dc:date>2023-01-13T20:27:08Z</dc:date>
    </item>
    <item>
      <title>Re: Related Posts Filter to Display Tags Related to Current Blog</title>
      <link>https://community.hubspot.com/t5/CMS-Development/Related-Posts-Filter-to-Display-Tags-Related-to-Current-Blog/m-p/741599#M32314</link>
      <description>&lt;P&gt;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").&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You'll instead want to use the&amp;nbsp;&lt;SPAN&gt;&lt;STRONG&gt;content.topic_list&lt;/STRONG&gt; mapped to &lt;STRONG&gt;name&lt;/STRONG&gt; and then the resulting array &lt;STRONG&gt;join&lt;/STRONG&gt;ed into a string. You can place this directly into the function by wrapping it in quotations and double curly brackets:&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;{% related_blog_posts limit=3, no_wrapper=True, post_formatter="recent_post", tags="{{ content.topic_list|map('name')|join(',') }}" %}&lt;/LI-CODE&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 15 Jan 2023 05:23:54 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/Related-Posts-Filter-to-Display-Tags-Related-to-Current-Blog/m-p/741599#M32314</guid>
      <dc:creator>alyssamwilie</dc:creator>
      <dc:date>2023-01-15T05:23:54Z</dc:date>
    </item>
    <item>
      <title>Re: Related Posts Filter to Display Tags Related to Current Blog</title>
      <link>https://community.hubspot.com/t5/CMS-Development/Related-Posts-Filter-to-Display-Tags-Related-to-Current-Blog/m-p/742107#M32335</link>
      <description>&lt;P&gt;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.&lt;/P&gt;</description>
      <pubDate>Mon, 16 Jan 2023 20:41:16 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/Related-Posts-Filter-to-Display-Tags-Related-to-Current-Blog/m-p/742107#M32335</guid>
      <dc:creator>unicorndev</dc:creator>
      <dc:date>2023-01-16T20:41:16Z</dc:date>
    </item>
  </channel>
</rss>

