<?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: Filter blog content module according to blog tags/topics on listing template in CMS Development</title>
    <link>https://community.hubspot.com/t5/CMS-Development/Filter-blog-content-module-according-to-blog-tags-topics-on/m-p/276446#M12706</link>
    <description>&lt;PRE&gt;{% else %}
&amp;lt;div class="blog-section"&amp;gt;
    &amp;lt;div class="blog-listing-wrapper cell-wrapper"&amp;gt;
        {# simple_list_page indicates the "blog/all" page, which is a list of links to every blog post #}
     
      &amp;lt;div class="post-listing{% if simple_list_page %}-simple{% endif %}"&amp;gt;
          
          {% if blog_author %}
                &amp;lt;div class="hs-author-profile"&amp;gt;
                    &amp;lt;h2 class="hs-author-name"&amp;gt;{{ blog_author.display_name }}&amp;lt;/h2&amp;gt;
                    {% if blog_author.avatar %} &amp;lt;div class="hs-author-avatar"&amp;gt; &amp;lt;img src="{{ blog_author.avatar }}"&amp;gt; &amp;lt;/div&amp;gt; {% endif %}
                    &amp;lt;div class="hs-author-bio"&amp;gt;{{ blog_author.bio }}&amp;lt;/div&amp;gt;
                    {% if blog_author.has_social_profiles %}
                        &amp;lt;div class="hs-author-social-section"&amp;gt;
                            &amp;lt;span class="hs-author-social-label"&amp;gt;Find me on:&amp;lt;/span&amp;gt;
                            &amp;lt;div class="hs-author-social-links"&amp;gt;
                                {% if blog_author.facebook %}
                                    &amp;lt;a href="{{ blog_author.facebook }}" target="_blank" class="hs-author-social-link hs-social-facebook"&amp;gt;&amp;amp;nbsp;&amp;lt;/a&amp;gt;
                                {% endif %}
                                {% if blog_author.linkedin %}
                                    &amp;lt;a href="{{ blog_author.linkedin }}" target="_blank" class="hs-author-social-link hs-social-linkedin"&amp;gt;&amp;amp;nbsp;&amp;lt;/a&amp;gt;
                                {% endif %}
                                {% if blog_author.twitter %}
                                    &amp;lt;a href="{{ blog_author.twitter }}" target="_blank" class="hs-author-social-link hs-social-twitter"&amp;gt;&amp;amp;nbsp;&amp;lt;/a&amp;gt;
                                {% endif %}
                                {% if blog_author.google_plus %}
                                    &amp;lt;a href="{{ blog_author.google_plus }}?rel=author" target="_blank" class="hs-author-social-link hs-social-google-plus"&amp;gt;&amp;amp;nbsp;&amp;lt;/a&amp;gt;
                                {% endif %}
                            &amp;lt;/div&amp;gt;
                        &amp;lt;/div&amp;gt;
                    {% endif %}
                &amp;lt;/div&amp;gt;
                &amp;lt;h3 class="hs-author-listing-header"&amp;gt;Recent Posts&amp;lt;/h3&amp;gt;
            {% endif %}

        &amp;lt;h3&amp;gt; &amp;lt;a href="https://news.besocialscene.com/topic/whiskey-content"&amp;gt; Whiskey Content  &amp;lt;/a&amp;gt;&amp;lt;/h3&amp;gt; 
            {% for content in whiskey_content %}
                &amp;lt;div class="post-item"&amp;gt;
                    {% if not simple_list_page %}
                                                &amp;lt;a href="{{content.absolute_url}}"&amp;gt;
                         
                        &amp;lt;div class="post-body clearfix"&amp;gt;

                       
                         {% if content.post_list_summary_featured_image %}
                                &amp;lt;div class="hs-featured-image-wrapper"&amp;gt;
                                  
                                        &amp;lt;img src="{{ content.post_list_summary_featured_image }}" class="hs-featured-image"  alt="{{ content.name }}"&amp;gt;
                                    
                                &amp;lt;/div&amp;gt;
                        {% endif %}
                        &amp;lt;div class="custom-date"&amp;gt;
                        {{ content.publish_date_local_time.strftime('%d') }}
                        {{ content.publish_date_local_time.strftime('%B') }}
                        &amp;lt;/div&amp;gt;
                            
                        &amp;lt;div class="post-header"&amp;gt;
                            &amp;lt;h2&amp;gt;{{ content.name }}&amp;lt;/h2&amp;gt;
                        &amp;lt;/div&amp;gt;
                        
                        
                          &amp;lt;!--post summary--&amp;gt;
                         
                            
                        &amp;lt;/div&amp;gt;
                          &amp;lt;/a&amp;gt;  
                       
                                            
                            
                       
                    {% else %}
                        &amp;lt;h2 class="post-listing-simple"&amp;gt;&amp;lt;a href="{{content.absolute_url}}"&amp;gt;{{ content.name }}&amp;lt;/a&amp;gt;&amp;lt;/h2&amp;gt;
                    {% endif %}
                &amp;lt;/div&amp;gt;
            {% endfor %}
        &amp;lt;div class="view-all-articles"&amp;gt;
    &amp;lt;p class="cta-blog-design"&amp;gt; &amp;lt;a href="https://news.besocialscene.com/topic/whiskey-content" target="_blank" &amp;gt;View All Whiskey Articles&amp;lt;/a&amp;gt;&amp;lt;/p&amp;gt; 
 &amp;lt;/div&amp;gt;

            &amp;lt;h3&amp;gt; &amp;lt;a href="https://news.besocialscene.com/topic/tequila-content"&amp;gt;Tequila Content &amp;lt;/a&amp;gt; &amp;lt;/h3&amp;gt; 
            {% for content in tequila_content %}
                &amp;lt;div class="post-item"&amp;gt;
                    {% if not simple_list_page %}
                                                &amp;lt;a href="{{content.absolute_url}}"&amp;gt;
                         
                        &amp;lt;div class="post-body clearfix"&amp;gt;

                       
                         {% if content.post_list_summary_featured_image %}
                                &amp;lt;div class="hs-featured-image-wrapper"&amp;gt;
                                  
                                        &amp;lt;img src="{{ content.post_list_summary_featured_image }}" class="hs-featured-image"  alt="{{ content.name }}"&amp;gt;
                                    
                                &amp;lt;/div&amp;gt;
                        {% endif %}
                        &amp;lt;div class="custom-date"&amp;gt;
                        {{ content.publish_date_local_time.strftime('%d') }}
                        {{ content.publish_date_local_time.strftime('%B') }}
                        &amp;lt;/div&amp;gt;
                            
                        &amp;lt;div class="post-header"&amp;gt;
                            &amp;lt;h2&amp;gt;{{ content.name }}&amp;lt;/h2&amp;gt;
                        &amp;lt;/div&amp;gt;
                        
                        
                          &amp;lt;!--post summary--&amp;gt;
                         
                            
                        &amp;lt;/div&amp;gt;
                          &amp;lt;/a&amp;gt;  
                       
                                            
                            
                       
                    {% else %}
                        &amp;lt;h2 class="post-listing-simple"&amp;gt;&amp;lt;a href="{{content.absolute_url}}"&amp;gt;{{ content.name }}&amp;lt;/a&amp;gt;&amp;lt;/h2&amp;gt;
                    {% endif %}
                &amp;lt;/div&amp;gt;
            {% endfor %}
        &amp;lt;div class="view-all-articles"&amp;gt;
    &amp;lt;p class="cta-blog-design"&amp;gt; &amp;lt;a href="https://news.besocialscene.com/topic/tequila-content" target="_blank" &amp;gt;View All Tequila Articles&amp;lt;/a&amp;gt;&amp;lt;/p&amp;gt; 
 &amp;lt;/div&amp;gt;
        &amp;lt;h3&amp;gt; &amp;lt;a href="https://news.besocialscene.com/topic/air-water-show-content"&amp;gt;Air &amp;amp; Water Show &amp;lt;/a&amp;gt; &amp;lt;/h3&amp;gt; 
            {% for content in air_water_show_content %}
                &amp;lt;div class="post-item"&amp;gt;
                    {% if not simple_list_page %}
                                                &amp;lt;a href="{{content.absolute_url}}"&amp;gt;
                         
                        &amp;lt;div class="post-body clearfix"&amp;gt;

                       
                         {% if content.post_list_summary_featured_image %}
                                &amp;lt;div class="hs-featured-image-wrapper"&amp;gt;
                                  
                                        &amp;lt;img src="{{ content.post_list_summary_featured_image }}" class="hs-featured-image"  alt="{{ content.name }}"&amp;gt;
                                    
                                &amp;lt;/div&amp;gt;
                        {% endif %}
                        &amp;lt;div class="custom-date"&amp;gt;
                        {{ content.publish_date_local_time.strftime('%d') }}
                        {{ content.publish_date_local_time.strftime('%B') }}
                        &amp;lt;/div&amp;gt;
                            
                        &amp;lt;div class="post-header"&amp;gt;
                            &amp;lt;h2&amp;gt;{{ content.name }}&amp;lt;/h2&amp;gt;
                        &amp;lt;/div&amp;gt;
                        
                        
                          &amp;lt;!--post summary--&amp;gt;
                         
                            
                        &amp;lt;/div&amp;gt;
                          &amp;lt;/a&amp;gt;  
                       
                                            
                            
                       
                    {% else %}
                        &amp;lt;h2 class="post-listing-simple"&amp;gt;&amp;lt;a href="{{content.absolute_url}}"&amp;gt;{{ content.name }}&amp;lt;/a&amp;gt;&amp;lt;/h2&amp;gt;
                    {% endif %}
                &amp;lt;/div&amp;gt;
            {% endfor %}
        &amp;lt;div class="view-all-articles"&amp;gt;
    &amp;lt;p class="cta-blog-design"&amp;gt; &amp;lt;a href="https://news.besocialscene.com/topic/air-water-show-content" target="_blank" &amp;gt;View Air &amp;amp; Water Show Articles&amp;lt;/a&amp;gt;&amp;lt;/p&amp;gt; 
 &amp;lt;/div&amp;gt;



        &amp;lt;h3&amp;gt; &amp;lt;a href="https://news.besocialscene.com/topic/halloween-content"&amp;gt; Halloween Content &amp;lt;/a&amp;gt; &amp;lt;/h3&amp;gt; 
            {% for content in halloween_content %}
                &amp;lt;div class="post-item"&amp;gt;
                    {% if not simple_list_page %}
                                                &amp;lt;a href="{{content.absolute_url}}"&amp;gt;
                         
                        &amp;lt;div class="post-body clearfix"&amp;gt;

                       
                         {% if content.post_list_summary_featured_image %}
                                &amp;lt;div class="hs-featured-image-wrapper"&amp;gt;
                                  
                                        &amp;lt;img src="{{ content.post_list_summary_featured_image }}" class="hs-featured-image"  alt="{{ content.name }}"&amp;gt;
                                    
                                &amp;lt;/div&amp;gt;
                        {% endif %}
                        &amp;lt;div class="custom-date"&amp;gt;
                        {{ content.publish_date_local_time.strftime('%d') }}
                        {{ content.publish_date_local_time.strftime('%B') }}
                        &amp;lt;/div&amp;gt;
                            
                        &amp;lt;div class="post-header"&amp;gt;
                            &amp;lt;h2&amp;gt;{{ content.name }}&amp;lt;/h2&amp;gt;
                        &amp;lt;/div&amp;gt;
                        
                        
                          &amp;lt;!--post summary--&amp;gt;
                         
                            
                        &amp;lt;/div&amp;gt;
                          &amp;lt;/a&amp;gt;  
                       
                                            
                            
                       
                    {% else %}
                        &amp;lt;h2 class="post-listing-simple"&amp;gt;&amp;lt;a href="{{content.absolute_url}}"&amp;gt;{{ content.name }}&amp;lt;/a&amp;gt;&amp;lt;/h2&amp;gt;
                    {% endif %}
                &amp;lt;/div&amp;gt;
            {% endfor %}
        &amp;lt;div class="view-all-articles"&amp;gt;
    &amp;lt;p class="cta-blog-design"&amp;gt; &amp;lt;a href="https://news.besocialscene.com/topic/halloween-content" target="_blank" &amp;gt;View All Halloween Articles&amp;lt;/a&amp;gt;&amp;lt;/p&amp;gt; 
 &amp;lt;/div&amp;gt;
        &amp;lt;h3&amp;gt;&amp;lt;a href="https://news.besocialscene.com/topic/new-years-content"&amp;gt;New Years Content&amp;lt;/a&amp;gt;&amp;lt;/h3&amp;gt; 
            {% for content in new_years_content %}
                &amp;lt;div class="post-item"&amp;gt;
                    {% if not simple_list_page %}
                                                &amp;lt;a href="{{content.absolute_url}}"&amp;gt;
                         
                        &amp;lt;div class="post-body clearfix"&amp;gt;

                       
                         {% if content.post_list_summary_featured_image %}
                                &amp;lt;div class="hs-featured-image-wrapper"&amp;gt;
                                  
                                        &amp;lt;img src="{{ content.post_list_summary_featured_image }}" class="hs-featured-image"  alt="{{ content.name }}"&amp;gt;
                                    
                                &amp;lt;/div&amp;gt;
                        {% endif %}
                        &amp;lt;div class="custom-date"&amp;gt;
                        {{ content.publish_date_local_time.strftime('%d') }}
                        {{ content.publish_date_local_time.strftime('%B') }}
                        &amp;lt;/div&amp;gt;
                            
                        &amp;lt;div class="post-header"&amp;gt;
                            &amp;lt;h2&amp;gt;{{ content.name }}&amp;lt;/h2&amp;gt;
                        &amp;lt;/div&amp;gt;
                        
                        
                          &amp;lt;!--post summary--&amp;gt;
                         
                            
                        &amp;lt;/div&amp;gt;
                          &amp;lt;/a&amp;gt;  
                       
                                            
                            
                       
                    {% else %}
                        &amp;lt;h2 class="post-listing-simple"&amp;gt;&amp;lt;a href="{{content.absolute_url}}"&amp;gt;{{ content.name }}&amp;lt;/a&amp;gt;&amp;lt;/h2&amp;gt;
                    {% endif %}
                &amp;lt;/div&amp;gt;
            {% endfor %}
        &amp;lt;div class="view-all-articles"&amp;gt;
    &amp;lt;p class="cta-blog-design"&amp;gt; &amp;lt;a href="https://news.besocialscene.com/topic/new-years-content" target="_blank" &amp;gt;View All New Year Articles&amp;lt;/a&amp;gt;&amp;lt;/p&amp;gt; 
 &amp;lt;/div&amp;gt;

        &amp;lt;h3&amp;gt; &amp;lt;a href="https://news.besocialscene.com/topic/st_patricks_day_content"&amp;gt; St. Patrick's Day Content &amp;lt;/a&amp;gt;&amp;lt;/h3&amp;gt; 
            {% for content in st_patricks_day_content %}
                &amp;lt;div class="post-item"&amp;gt;
                    {% if not simple_list_page %}
                                                &amp;lt;a href="{{content.absolute_url}}"&amp;gt;
                         
                        &amp;lt;div class="post-body clearfix"&amp;gt;

                       
                         {% if content.post_list_summary_featured_image %}
                                &amp;lt;div class="hs-featured-image-wrapper"&amp;gt;
                                  
                                        &amp;lt;img src="{{ content.post_list_summary_featured_image }}" class="hs-featured-image"  alt="{{ content.name }}"&amp;gt;
                                    
                                &amp;lt;/div&amp;gt;
                        {% endif %}
                        &amp;lt;div class="custom-date"&amp;gt;
                        {{ content.publish_date_local_time.strftime('%d') }}
                        {{ content.publish_date_local_time.strftime('%B') }}
                        &amp;lt;/div&amp;gt;
                            
                        &amp;lt;div class="post-header"&amp;gt;
                            &amp;lt;h2&amp;gt;{{ content.name }}&amp;lt;/h2&amp;gt;
                        &amp;lt;/div&amp;gt;
                        
                        
                          &amp;lt;!--post summary--&amp;gt;
                         
                            
                        &amp;lt;/div&amp;gt;
                          &amp;lt;/a&amp;gt;  
                       
                                            
                            
                       
                    {% else %}
                        &amp;lt;h2 class="post-listing-simple"&amp;gt;&amp;lt;a href="{{content.absolute_url}}"&amp;gt;{{ content.name }}&amp;lt;/a&amp;gt;&amp;lt;/h2&amp;gt;
                    {% endif %}
                &amp;lt;/div&amp;gt;
            {% endfor %}
        &amp;lt;div class="view-all-articles"&amp;gt;
    &amp;lt;p class="cta-blog-design"&amp;gt; &amp;lt;a href="https://news.besocialscene.com/topic/st-patricks-day-content" target="_blank" &amp;gt;View All St. Patrick's Articles&amp;lt;/a&amp;gt;&amp;lt;/p&amp;gt; 
 &amp;lt;/div&amp;gt;


        &amp;lt;/div&amp;gt;

        {% if not simple_list_page %}
 &amp;lt;!-- Numbered Pagination --&amp;gt;

{% endif %}
        
  &amp;lt;/div&amp;gt;
 &amp;lt;/div&amp;gt;

{% endif %}&lt;/PRE&gt;&lt;P&gt;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/3688"&gt;@Jsum&lt;/a&gt;&amp;nbsp;, just in case you need this code as well&lt;/P&gt;</description>
    <pubDate>Thu, 20 Jun 2019 21:33:46 GMT</pubDate>
    <dc:creator>chrissa0000</dc:creator>
    <dc:date>2019-06-20T21:33:46Z</dc:date>
    <item>
      <title>Filter blog content module according to blog tags/topics on listing template</title>
      <link>https://community.hubspot.com/t5/CMS-Development/Filter-blog-content-module-according-to-blog-tags-topics-on/m-p/273297#M12486</link>
      <description>&lt;P&gt;Hi!&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would like to ask how can I able to filter the recent posts to this blog content template , currently this code will make all of the recent posts appear. We want to modify it by arranging it according to categry for example this type of topic.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Whiskey Content&lt;/P&gt;&lt;P&gt;Feature three articles&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Tequila Content&lt;/P&gt;&lt;P&gt;Feature three articles&lt;/P&gt;&lt;P&gt;I have this type of filter set-up in one of ourr homepage, and tried to insert in below the blog-section div, but it seems won't work.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;{% set topic_posts = blog_recent_topic_posts(4488098559, 'whiskey-content', 3) %}   &lt;/PRE&gt;&lt;PRE&gt;&lt;BR /&gt;&amp;lt;div class="blog-section"&amp;gt;
    &amp;lt;div class="blog-listing-wrapper cell-wrapper"&amp;gt;
        {# simple_list_page indicates the "blog/all" page, which is a list of links to every blog post #}
        &amp;lt;div class="post-listing{% if simple_list_page %}-simple{% endif %}"&amp;gt;
            {% if blog_author %}
                &amp;lt;div class="hs-author-profile"&amp;gt;
                    &amp;lt;h2 class="hs-author-name"&amp;gt;{{ blog_author.display_name }}&amp;lt;/h2&amp;gt;
                    {% if blog_author.avatar %} &amp;lt;div class="hs-author-avatar"&amp;gt; &amp;lt;img src="{{ blog_author.avatar }}"&amp;gt; &amp;lt;/div&amp;gt; {% endif %}
                    &amp;lt;div class="hs-author-bio"&amp;gt;{{ blog_author.bio }}&amp;lt;/div&amp;gt;
                    {% if blog_author.has_social_profiles %}
                        &amp;lt;div class="hs-author-social-section"&amp;gt;
                            &amp;lt;span class="hs-author-social-label"&amp;gt;Find me on:&amp;lt;/span&amp;gt;
                            &amp;lt;div class="hs-author-social-links"&amp;gt;
                                {% if blog_author.facebook %}
                                    &amp;lt;a href="{{ blog_author.facebook }}" target="_blank" class="hs-author-social-link hs-social-facebook"&amp;gt;&amp;amp;nbsp;&amp;lt;/a&amp;gt;
                                {% endif %}
                                {% if blog_author.linkedin %}
                                    &amp;lt;a href="{{ blog_author.linkedin }}" target="_blank" class="hs-author-social-link hs-social-linkedin"&amp;gt;&amp;amp;nbsp;&amp;lt;/a&amp;gt;
                                {% endif %}
                                {% if blog_author.twitter %}
                                    &amp;lt;a href="{{ blog_author.twitter }}" target="_blank" class="hs-author-social-link hs-social-twitter"&amp;gt;&amp;amp;nbsp;&amp;lt;/a&amp;gt;
                                {% endif %}
                                {% if blog_author.google_plus %}
                                    &amp;lt;a href="{{ blog_author.google_plus }}?rel=author" target="_blank" class="hs-author-social-link hs-social-google-plus"&amp;gt;&amp;amp;nbsp;&amp;lt;/a&amp;gt;
                                {% endif %}
                            &amp;lt;/div&amp;gt;
                        &amp;lt;/div&amp;gt;
                    {% endif %}
                &amp;lt;/div&amp;gt;
                &amp;lt;h3 class="hs-author-listing-header"&amp;gt;Recent Posts&amp;lt;/h3&amp;gt;
            {% endif %}
            {% for content in contents %}
                &amp;lt;div class="post-item"&amp;gt;
                    {% if not simple_list_page %}
                                                &amp;lt;a href="{{content.absolute_url}}"&amp;gt;
                         
                        &amp;lt;div class="post-body clearfix"&amp;gt;

                       
                         {% if content.post_list_summary_featured_image %}
                                &amp;lt;div class="hs-featured-image-wrapper"&amp;gt;
                                  
                                        &amp;lt;img src="{{ content.post_list_summary_featured_image }}" class="hs-featured-image"  alt="{{ content.name }}"&amp;gt;
                                    
                                &amp;lt;/div&amp;gt;
                        {% endif %}
                        &amp;lt;div class="custom-date"&amp;gt;
                        {{ content.publish_date_local_time.strftime('%d') }}
                        {{ content.publish_date_local_time.strftime('%B') }}
                        &amp;lt;/div&amp;gt;
                            
                        &amp;lt;div class="post-header"&amp;gt;
                            &amp;lt;h2&amp;gt;{{ content.name }}&amp;lt;/h2&amp;gt;
                        &amp;lt;/div&amp;gt;
                        
                        
                          &amp;lt;!--post summary--&amp;gt;
                         
                            
                        &amp;lt;/div&amp;gt;
                          &amp;lt;/a&amp;gt;  
                       
                                            
                            
                       
                    {% else %}
                        &amp;lt;h2 class="post-listing-simple"&amp;gt;&amp;lt;a href="{{content.absolute_url}}"&amp;gt;{{ content.name }}&amp;lt;/a&amp;gt;&amp;lt;/h2&amp;gt;
                    {% endif %}
                &amp;lt;/div&amp;gt;
            {% endfor %}
        &amp;lt;/div&amp;gt;

        {% if not simple_list_page %}
 &amp;lt;!-- Numbered Pagination --&amp;gt;
&amp;lt;div class="blog-pagination"&amp;gt;
    {% set page_list = [-2, -1, 0, 1, 2] %}
    {% if contents.total_page_count - current_page_num == 1 %}{% set offset = -1 %}
    {% elif contents.total_page_count - current_page_num == 0 %}{% set offset = -2 %}
    {% elif current_page_num == 2 %}{% set offset = 1 %}
    {% elif current_page_num == 1 %}{% set offset = 2 %}
    {% else %}{% set offset = 0 %}{% endif %}

    &amp;lt;div class="blog-pagination-left"&amp;gt;
        {% if contents.total_page_count &amp;gt; 5 %}
            {% if current_page_num &amp;gt;= 4 %}
                &amp;lt;a href="{{ blog_page_link(1) }}"&amp;gt;1&amp;lt;/a&amp;gt;
                &amp;lt;a class="elipses" href="{% if current_page_num &amp;lt;= 5 %}{{ blog_page_link(1) }}{% else %}{{ blog_page_link(current_page_num - 5) }}{% endif %}"&amp;gt;...&amp;lt;/a&amp;gt;
            {% endif %}
        {% endif %}
    &amp;lt;/div&amp;gt;
    &amp;lt;div class="blog-pagination-center"&amp;gt;
        {% for page in page_list %}
            {% set this_page = current_page_num + page + offset %}
            {% if this_page &amp;gt; 0 and this_page &amp;lt;= contents.total_page_count %}
                &amp;lt;a {% if this_page == current_page_num %}class="active"{% endif %} href="{{ blog_page_link(this_page) }}"&amp;gt;{{ this_page }}&amp;lt;/a&amp;gt;
            {% endif %}
        {% endfor %}
    &amp;lt;/div&amp;gt;
    &amp;lt;div class="blog-pagination-right"&amp;gt;
        {% if contents.total_page_count &amp;gt; 5 %}
            {% if contents.total_page_count - current_page_num &amp;gt; 2 %}
                &amp;lt;a class="elipses" href="{% if contents.total_page_count - current_page_num &amp;lt;= 5 %}{{ contents.total_page_count }}{% else %}{{ blog_page_link(current_page_num + 5) }}{% endif %}"&amp;gt;...&amp;lt;/a&amp;gt;
                &amp;lt;a href="{{ blog_page_link(contents.total_page_count) }}"&amp;gt;{{ contents.total_page_count }}&amp;lt;/a&amp;gt;
            {% endif %}
        {% endif %}   
    &amp;lt;/div&amp;gt;
    &amp;lt;div class="pager"&amp;gt;
         {% if last_page_num %}&amp;lt;a class="prev-link" href="{{ blog_page_link(last_page_num) }}"&amp;gt;« Previous&amp;lt;/a&amp;gt;{% endif %}
         {% if next_page_num %}&amp;lt;a class="next-link" href="{{ blog_page_link(current_page_num + 1) }}"&amp;gt;Next »&amp;lt;/a&amp;gt;{% endif %}
        
         
    &amp;lt;/div&amp;gt;
&amp;lt;/div&amp;gt;
{% endif %}
        
    &amp;lt;/div&amp;gt;
&amp;lt;/div&amp;gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 04 Jun 2019 02:22:17 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/Filter-blog-content-module-according-to-blog-tags-topics-on/m-p/273297#M12486</guid>
      <dc:creator>chrissa0000</dc:creator>
      <dc:date>2019-06-04T02:22:17Z</dc:date>
    </item>
    <item>
      <title>Re: Filter blog content module according to blog tags/topics on listing template</title>
      <link>https://community.hubspot.com/t5/CMS-Development/Filter-blog-content-module-according-to-blog-tags-topics-on/m-p/273546#M12499</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/63495"&gt;@chrissa0000&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The Hubspot blog system provides a list of blogs using the {{ contents }} variable.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you look in the code you provided, you will see a for loop that is similar to:&lt;/P&gt;
&lt;PRE&gt;{% for content in contents %}
{% endfor %}&lt;/PRE&gt;
&lt;P&gt;This is the standard method for listing out blog posts.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The function you shared at the top of your code is the standard function, provided in the hubl docs, for creating a feed of topic specfic posts.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://designers.hubspot.com/en/docs/hubl/hubl-supported-functions#blog-recent-tag-posts" target="_blank"&gt;https://designers.hubspot.com/en/docs/hubl/hubl-supported-functions#blog-recent-tag-posts&lt;/A&gt;&lt;/P&gt;
&lt;PRE&gt;{% set tag_posts = blog_recent_tag_posts('default', ['marketing', 'fun', 'inbound'], 3) %}
{% for tag_post in tag_posts %}
    &amp;lt;div class="post-title"&amp;gt;{{ tag_post.name }}&amp;lt;/div&amp;gt;
{% endfor %}&lt;/PRE&gt;
&lt;P&gt;Notice that the for loop from the Hubl docs example is almost exactly like the contents loop, except that it is looping through the "tag_posts" variable, which is holding feed you create when setting the "tag_posts" variable. This:&lt;/P&gt;
&lt;PRE&gt;{% set tag_posts = blog_recent_tag_posts('default', ['marketing', 'fun', 'inbound'], 3) %}&lt;/PRE&gt;
&lt;P&gt;sets the variable, and this:&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;{% for tag_post in tag_posts %}
    &amp;lt;div class="post-title"&amp;gt;{{ tag_post.name }}&amp;lt;/div&amp;gt;
{% endfor %}&lt;/PRE&gt;
&lt;P&gt;loops through the items in the variable.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You could modify the {% for content in contents %} loop to use the variable you create at the top of your code:&lt;/P&gt;
&lt;PRE&gt;% set topic_posts = blog_recent_topic_posts(4488098559, 'whiskey-content', 3) %}&lt;/PRE&gt;
&lt;P&gt;is at the top of your code, so replace contents with topic_post:&lt;/P&gt;
&lt;PRE&gt;{% for content in  &lt;STRIKE&gt;contents&lt;/STRIKE&gt; topic_posts %}

{% endfor %}&lt;/PRE&gt;
&lt;P&gt;and this would be the cleanest way to replace the default feed with your custom feed. However, this isn't the best option for working directly in your blog template, as you would lose some default functionality such as pagination, simple list view, native topic filter (&lt;A href="http://www.website.com/blog/topic/topic-name" target="_blank"&gt;www.website.com/blog/topic/topic-name&lt;/A&gt;) and etc. it is best to use the contents variable.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can use both in a template though. You can also use conditional login to check for the type of view being requested to serve the contents loop for the specific view types, i.e. use the contents loop if a simple list view is being accessed but use custom feed functions if it is the main listing page. The best way to go about this will depend on the specifics of what you are trying to accomplish.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Let me know if this helps.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Need help? &lt;A href="https://www.upwork.com/o/companies/_~0124e15ff34efb3871/" target="_blank" rel="noopener"&gt;Hire Us Here&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 04 Jun 2019 21:20:05 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/Filter-blog-content-module-according-to-blog-tags-topics-on/m-p/273546#M12499</guid>
      <dc:creator>Jsum</dc:creator>
      <dc:date>2019-06-04T21:20:05Z</dc:date>
    </item>
    <item>
      <title>Re: Filter blog content module according to blog tags/topics on listing template</title>
      <link>https://community.hubspot.com/t5/CMS-Development/Filter-blog-content-module-according-to-blog-tags-topics-on/m-p/273627#M12513</link>
      <description>&lt;P&gt;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/3688"&gt;@Jsum&lt;/a&gt;&amp;nbsp;Thank you for the help, I already sort the tags according to the content we wish&lt;/P&gt;&lt;P&gt;to have.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="newblog1.PNG" style="width: 923px;"&gt;&lt;img src="https://community.hubspot.com/t5/image/serverpage/image-id/17580i8348140FB97B6BBF/image-size/large?v=v2&amp;amp;px=999" role="button" title="newblog1.PNG" alt="newblog1.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;My concern would be how do I use both of the templates since I would want to insert a link&amp;nbsp; "view all articles" related the topic for example all the whiskey content&amp;nbsp;&lt;A href="https://news.besocialscene.com/topic/whiskey-content" target="_blank"&gt;https://news.besocialscene.com/topic/whiskey-content&lt;/A&gt;. I presume after I make the template live. I would not be able to use the existing template anymore and as what you have said I will lost the pagination as well?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 05 Jun 2019 13:00:55 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/Filter-blog-content-module-according-to-blog-tags-topics-on/m-p/273627#M12513</guid>
      <dc:creator>chrissa0000</dc:creator>
      <dc:date>2019-06-05T13:00:55Z</dc:date>
    </item>
    <item>
      <title>Re: Filter blog content module according to blog tags/topics on listing template</title>
      <link>https://community.hubspot.com/t5/CMS-Development/Filter-blog-content-module-according-to-blog-tags-topics-on/m-p/273752#M12520</link>
      <description>&lt;P&gt;Hey&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/63495"&gt;@chrissa0000&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There are a few HubL variables that you can use to change the behavior of a template.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;topic:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;{% if topic %}{% endif %}&lt;/PRE&gt;
&lt;P&gt;'topic' is true if the user is looking at a topic specific list (&lt;A href="http://www.website.com/blog/topic/topic_name).&amp;nbsp;" target="_blank" rel="noopener"&gt;www.website.com/blog/topic/topic_name).&amp;nbsp;&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;is_listing_view:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;{% if is_listing_view %}{% endif %}&lt;/PRE&gt;
&lt;P&gt;'is_listing_view' is true if the user is looking at any version of the listing page for the blog. use this to have your listing layout and individual post in the same tempalte.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;simple_list_page:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;{% if simple_list_page %}{% endif %}&lt;/PRE&gt;
&lt;P&gt;'simple_list_page' is true if the user goes to a blog link where the posts would be listed out in a simplified manner. I believe this applies to date filtered pages, topic filtered pages, all blogs, etc. I don't use this much so I'm a little rusty on its use.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;using if/else logic you can configure your blog to use different methods for showing your posts:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;{% if topic %}
    {# for content in contents loop to show topic specific list with default hubspot blog features #}
{% else %}
  {# custom blog feed #}
{% endif %}
&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can combine, nest, and use these conditions multiple times in multiple places in a template.&amp;nbsp; A good reference for this are the &lt;A href="https://designers.hubspot.com/docs/hubl/blog-content-markup" target="_blank" rel="noopener"&gt;blog content markup examples&lt;/A&gt; in the HubL docs.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There is also a list of &lt;A href="https://designers.hubspot.com/docs/hubl/hubl-supported-variables#hs_cos_wrapper_widget_2872294923" target="_blank" rel="noopener"&gt;blog variables&lt;/A&gt; in the HubL docs, with descriptions.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You'll have to get creative with the logic, but I have built some pretty crazy listing pages so I'm sure you can do what you are wanting here.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Let me know if that helps.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Need help? &lt;A href="https://www.upwork.com/o/companies/_~0124e15ff34efb3871/" target="_blank" rel="noopener"&gt;Hire Us Here&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 06 Jun 2019 05:41:45 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/Filter-blog-content-module-according-to-blog-tags-topics-on/m-p/273752#M12520</guid>
      <dc:creator>Jsum</dc:creator>
      <dc:date>2019-06-06T05:41:45Z</dc:date>
    </item>
    <item>
      <title>Re: Filter blog content module according to blog tags/topics on listing template</title>
      <link>https://community.hubspot.com/t5/CMS-Development/Filter-blog-content-module-according-to-blog-tags-topics-on/m-p/274995#M12602</link>
      <description>&lt;P&gt;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/3688"&gt;@Jsum&lt;/a&gt;&amp;nbsp;,&amp;nbsp; I really appreciate your help on this. I just want to ask a follow-up question.&amp;nbsp; This code already works for the listing template, but when I tried to open the topic links the&amp;nbsp;{% if topic %}&amp;nbsp;{% endif %} won't run and would just view the listing template.&lt;/P&gt;&lt;PRE&gt;{% set whiskey_content = blog_recent_topic_posts(BlogIdNumber, 'whiskey-content', 3) %}
{% set tequila_content = blog_recent_topic_posts(BlogIdNumber, 'tequila-content', 3) %}
{% set air_water_show_content = blog_recent_topic_posts(BlogIdNumber, 'air-water-show-content', 3) %}
{% set halloween_content = blog_recent_topic_posts(BlogIdNumber, 'halloween-content', 3) %}
{% set new_years_content = blog_recent_topic_posts(BlogIdNumber, 'new-years-content', 3) %}
{% set st_patricks_day_content = blog_recent_topic_posts(BlogIdNumber, 'st-patricks-day-content', 3) %}&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;{% if is_listing_view %}

// This code here already works //

{% endif %}&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;{% if topic %}

&amp;lt;div class="blog-section"&amp;gt;
    &amp;lt;div class="blog-listing-wrapper cell-wrapper"&amp;gt;
        {# simple_list_page indicates the "blog/all" page, which is a list of links to every blog post #}
        &amp;lt;div class="post-listing{% if simple_list_page %}-simple{% endif %}"&amp;gt;
            {% if blog_author %}
                &amp;lt;div class="hs-author-profile"&amp;gt;
                    &amp;lt;h2 class="hs-author-name"&amp;gt;{{ blog_author.display_name }}&amp;lt;/h2&amp;gt;
                    {% if blog_author.avatar %} &amp;lt;div class="hs-author-avatar"&amp;gt; &amp;lt;img src="{{ blog_author.avatar }}"&amp;gt; &amp;lt;/div&amp;gt; {% endif %}
                    &amp;lt;div class="hs-author-bio"&amp;gt;{{ blog_author.bio }}&amp;lt;/div&amp;gt;
                    {% if blog_author.has_social_profiles %}
                        &amp;lt;div class="hs-author-social-section"&amp;gt;
                            &amp;lt;span class="hs-author-social-label"&amp;gt;Find me on:&amp;lt;/span&amp;gt;
                            &amp;lt;div class="hs-author-social-links"&amp;gt;
                                {% if blog_author.facebook %}
                                    &amp;lt;a href="{{ blog_author.facebook }}" target="_blank" class="hs-author-social-link hs-social-facebook"&amp;gt;&amp;amp;nbsp;&amp;lt;/a&amp;gt;
                                {% endif %}
                                {% if blog_author.linkedin %}
                                    &amp;lt;a href="{{ blog_author.linkedin }}" target="_blank" class="hs-author-social-link hs-social-linkedin"&amp;gt;&amp;amp;nbsp;&amp;lt;/a&amp;gt;
                                {% endif %}
                                {% if blog_author.twitter %}
                                    &amp;lt;a href="{{ blog_author.twitter }}" target="_blank" class="hs-author-social-link hs-social-twitter"&amp;gt;&amp;amp;nbsp;&amp;lt;/a&amp;gt;
                                {% endif %}
                                {% if blog_author.google_plus %}
                                    &amp;lt;a href="{{ blog_author.google_plus }}?rel=author" target="_blank" class="hs-author-social-link hs-social-google-plus"&amp;gt;&amp;amp;nbsp;&amp;lt;/a&amp;gt;
                                {% endif %}
                            &amp;lt;/div&amp;gt;
                        &amp;lt;/div&amp;gt;
                    {% endif %}
                &amp;lt;/div&amp;gt;
                &amp;lt;h3 class="hs-author-listing-header"&amp;gt;Recent Posts&amp;lt;/h3&amp;gt;
            {% endif %}
            {% for content in contents %}
                &amp;lt;div class="post-item"&amp;gt;
                    {% if not simple_list_page %}
                                                &amp;lt;a href="{{content.absolute_url}}"&amp;gt;
                         
                        &amp;lt;div class="post-body clearfix"&amp;gt;

                       
                         {% if content.post_list_summary_featured_image %}
                                &amp;lt;div class="hs-featured-image-wrapper"&amp;gt;
                                  
                                        &amp;lt;img src="{{ content.post_list_summary_featured_image }}" class="hs-featured-image"  alt="{{ content.name }}"&amp;gt;
                                    
                                &amp;lt;/div&amp;gt;
                        {% endif %}
                        &amp;lt;div class="custom-date"&amp;gt;
                        {{ content.publish_date_local_time.strftime('%d') }}
                        {{ content.publish_date_local_time.strftime('%B') }}
                        &amp;lt;/div&amp;gt;
                            
                        &amp;lt;div class="post-header"&amp;gt;
                            &amp;lt;h2&amp;gt;{{ content.name }}&amp;lt;/h2&amp;gt;
                        &amp;lt;/div&amp;gt;
                        
                        
                          &amp;lt;!--post summary--&amp;gt;
                         
                            
                        &amp;lt;/div&amp;gt;
                          &amp;lt;/a&amp;gt;  
                       
                                            
                            
                       
                    {% else %}
                        &amp;lt;h2 class="post-listing-simple"&amp;gt;&amp;lt;a href="{{content.absolute_url}}"&amp;gt;{{ content.name }}&amp;lt;/a&amp;gt;&amp;lt;/h2&amp;gt;
                    {% endif %}
                &amp;lt;/div&amp;gt;
            {% endfor %}
        &amp;lt;/div&amp;gt;

{% if not simple_list_page %}
 &amp;lt;!-- Numbered Pagination --&amp;gt;
&amp;lt;div class="blog-pagination"&amp;gt;
    {% set page_list = [-2, -1, 0, 1, 2] %}
    {% if contents.total_page_count - current_page_num == 1 %}{% set offset = -1 %}
    {% elif contents.total_page_count - current_page_num == 0 %}{% set offset = -2 %}
    {% elif current_page_num == 2 %}{% set offset = 1 %}
    {% elif current_page_num == 1 %}{% set offset = 2 %}
    {% else %}{% set offset = 0 %}{% endif %}

    &amp;lt;div class="blog-pagination-left"&amp;gt;
        {% if contents.total_page_count &amp;gt; 5 %}
            {% if current_page_num &amp;gt;= 4 %}
                &amp;lt;a href="{{ blog_page_link(1) }}"&amp;gt;1&amp;lt;/a&amp;gt;
                &amp;lt;a class="elipses" href="{% if current_page_num &amp;lt;= 5 %}{{ blog_page_link(1) }}{% else %}{{ blog_page_link(current_page_num - 5) }}{% endif %}"&amp;gt;...&amp;lt;/a&amp;gt;
            {% endif %}
        {% endif %}
    &amp;lt;/div&amp;gt;
    &amp;lt;div class="blog-pagination-center"&amp;gt;
        {% for page in page_list %}
            {% set this_page = current_page_num + page + offset %}
            {% if this_page &amp;gt; 0 and this_page &amp;lt;= contents.total_page_count %}
                &amp;lt;a {% if this_page == current_page_num %}class="active"{% endif %} href="{{ blog_page_link(this_page) }}"&amp;gt;{{ this_page }}&amp;lt;/a&amp;gt;
            {% endif %}
        {% endfor %}
    &amp;lt;/div&amp;gt;
    &amp;lt;div class="blog-pagination-right"&amp;gt;
        {% if contents.total_page_count &amp;gt; 5 %}
            {% if contents.total_page_count - current_page_num &amp;gt; 2 %}
                &amp;lt;a class="elipses" href="{% if contents.total_page_count - current_page_num &amp;lt;= 5 %}{{ contents.total_page_count }}{% else %}{{ blog_page_link(current_page_num + 5) }}{% endif %}"&amp;gt;...&amp;lt;/a&amp;gt;
                &amp;lt;a href="{{ blog_page_link(contents.total_page_count) }}"&amp;gt;{{ contents.total_page_count }}&amp;lt;/a&amp;gt;
            {% endif %}
        {% endif %}   
    &amp;lt;/div&amp;gt;
    &amp;lt;div class="pager"&amp;gt;
         {% if last_page_num %}&amp;lt;a class="prev-link" href="{{ blog_page_link(last_page_num) }}"&amp;gt;« Previous&amp;lt;/a&amp;gt;{% endif %}
         {% if next_page_num %}&amp;lt;a class="next-link" href="{{ blog_page_link(current_page_num + 1) }}"&amp;gt;Next »&amp;lt;/a&amp;gt;{% endif %}
        
         
    &amp;lt;/div&amp;gt;
&amp;lt;/div&amp;gt;
{% endif %}
        
    &amp;lt;/div&amp;gt;
&amp;lt;/div&amp;gt;


{% endif %}&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 13 Jun 2019 12:54:51 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/Filter-blog-content-module-according-to-blog-tags-topics-on/m-p/274995#M12602</guid>
      <dc:creator>chrissa0000</dc:creator>
      <dc:date>2019-06-13T12:54:51Z</dc:date>
    </item>
    <item>
      <title>Re: Filter blog content module according to blog tags/topics on listing template</title>
      <link>https://community.hubspot.com/t5/CMS-Development/Filter-blog-content-module-according-to-blog-tags-topics-on/m-p/275005#M12604</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/63495"&gt;@chrissa0000&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;No problem.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It looks like you are trying to get use the {{ topic }} variable to recognize the feeds from your custom functions.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The {{ topic }} variable is set by the blog system. it is set to false unless you are on a topic url (&lt;A href="http://www.website.com/blog/topic/topic_name" target="_blank"&gt;www.website.com/blog/topic/topic_name&lt;/A&gt;). if on a topic url {{ topic }} equals the slug of the topic in the url. Also, the {% for content in contents %} loop will automatically filter your posts by the {{ topic }} when on a topic url.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;I see that you are using the contents loop inside your topics condition. are the posts showing up filtered to the topic in the url?&lt;/P&gt;</description>
      <pubDate>Thu, 13 Jun 2019 13:22:41 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/Filter-blog-content-module-according-to-blog-tags-topics-on/m-p/275005#M12604</guid>
      <dc:creator>Jsum</dc:creator>
      <dc:date>2019-06-13T13:22:41Z</dc:date>
    </item>
    <item>
      <title>Re: Filter blog content module according to blog tags/topics on listing template</title>
      <link>https://community.hubspot.com/t5/CMS-Development/Filter-blog-content-module-according-to-blog-tags-topics-on/m-p/275036#M12609</link>
      <description>&lt;P&gt;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/3688"&gt;@Jsum&lt;/a&gt;&amp;nbsp;, no it is not showing up the topic. When you click on it, the if listing template appears.&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 13 Jun 2019 14:27:13 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/Filter-blog-content-module-according-to-blog-tags-topics-on/m-p/275036#M12609</guid>
      <dc:creator>chrissa0000</dc:creator>
      <dc:date>2019-06-13T14:27:13Z</dc:date>
    </item>
    <item>
      <title>Re: Filter blog content module according to blog tags/topics on listing template</title>
      <link>https://community.hubspot.com/t5/CMS-Development/Filter-blog-content-module-according-to-blog-tags-topics-on/m-p/275189#M12616</link>
      <description>&lt;P&gt;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/63495"&gt;@chrissa0000&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I see. {{ is_listing_view }} is always true when you are on a listing page, whether your looking at a topic filtered list, an archive list, a simple list, or the default list. This variable is used to differentiate between a listing view and a post view:&lt;/P&gt;
&lt;PRE&gt;{% if is_listing_view %}
    {# All of your list specific markup goes here, even your {{topic}} logic. #}
{% else %}
    {# your individual post markup goes here #}
{% endif %}&lt;/PRE&gt;
&lt;P&gt;All of your listing specific markup should should in the true area of the {% if is_listing_view %} statement. Inside this condition you can create the logic to change the markup based on if filtering by topic or etc.&lt;/P&gt;</description>
      <pubDate>Fri, 14 Jun 2019 00:06:14 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/Filter-blog-content-module-according-to-blog-tags-topics-on/m-p/275189#M12616</guid>
      <dc:creator>Jsum</dc:creator>
      <dc:date>2019-06-14T00:06:14Z</dc:date>
    </item>
    <item>
      <title>Re: Filter blog content module according to blog tags/topics on listing template</title>
      <link>https://community.hubspot.com/t5/CMS-Development/Filter-blog-content-module-according-to-blog-tags-topics-on/m-p/275387#M12627</link>
      <description>&lt;P&gt;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/3688"&gt;@Jsum&lt;/a&gt;&amp;nbsp;, really thank you , I am on the verge of pulling my hair.&amp;nbsp; Now I get it why both of the templates appear when I am on the topic list url, for example the design here should be inside {% if topic %} ,&amp;nbsp;&amp;nbsp;&lt;A href="https://news.besocialscene.com/topic/whiskey-content" target="_blank"&gt;https://news.besocialscene.com/topic/whiskey-content&lt;/A&gt;&amp;nbsp; what happened is that below it the code&lt;/P&gt;&lt;P&gt;{% if is_listing_view %}, still appears because&amp;nbsp; the is_listing_view is still true and It still inside a topic list.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Do you know any alternative on how to separate both so that the when on topic list the the code inside the&amp;nbsp;{% if is_listing_view %} disappears when on topic list?.&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 15 Jun 2019 00:56:23 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/Filter-blog-content-module-according-to-blog-tags-topics-on/m-p/275387#M12627</guid>
      <dc:creator>chrissa0000</dc:creator>
      <dc:date>2019-06-15T00:56:23Z</dc:date>
    </item>
    <item>
      <title>Re: Filter blog content module according to blog tags/topics on listing template</title>
      <link>https://community.hubspot.com/t5/CMS-Development/Filter-blog-content-module-according-to-blog-tags-topics-on/m-p/276446#M12706</link>
      <description>&lt;PRE&gt;{% else %}
&amp;lt;div class="blog-section"&amp;gt;
    &amp;lt;div class="blog-listing-wrapper cell-wrapper"&amp;gt;
        {# simple_list_page indicates the "blog/all" page, which is a list of links to every blog post #}
     
      &amp;lt;div class="post-listing{% if simple_list_page %}-simple{% endif %}"&amp;gt;
          
          {% if blog_author %}
                &amp;lt;div class="hs-author-profile"&amp;gt;
                    &amp;lt;h2 class="hs-author-name"&amp;gt;{{ blog_author.display_name }}&amp;lt;/h2&amp;gt;
                    {% if blog_author.avatar %} &amp;lt;div class="hs-author-avatar"&amp;gt; &amp;lt;img src="{{ blog_author.avatar }}"&amp;gt; &amp;lt;/div&amp;gt; {% endif %}
                    &amp;lt;div class="hs-author-bio"&amp;gt;{{ blog_author.bio }}&amp;lt;/div&amp;gt;
                    {% if blog_author.has_social_profiles %}
                        &amp;lt;div class="hs-author-social-section"&amp;gt;
                            &amp;lt;span class="hs-author-social-label"&amp;gt;Find me on:&amp;lt;/span&amp;gt;
                            &amp;lt;div class="hs-author-social-links"&amp;gt;
                                {% if blog_author.facebook %}
                                    &amp;lt;a href="{{ blog_author.facebook }}" target="_blank" class="hs-author-social-link hs-social-facebook"&amp;gt;&amp;amp;nbsp;&amp;lt;/a&amp;gt;
                                {% endif %}
                                {% if blog_author.linkedin %}
                                    &amp;lt;a href="{{ blog_author.linkedin }}" target="_blank" class="hs-author-social-link hs-social-linkedin"&amp;gt;&amp;amp;nbsp;&amp;lt;/a&amp;gt;
                                {% endif %}
                                {% if blog_author.twitter %}
                                    &amp;lt;a href="{{ blog_author.twitter }}" target="_blank" class="hs-author-social-link hs-social-twitter"&amp;gt;&amp;amp;nbsp;&amp;lt;/a&amp;gt;
                                {% endif %}
                                {% if blog_author.google_plus %}
                                    &amp;lt;a href="{{ blog_author.google_plus }}?rel=author" target="_blank" class="hs-author-social-link hs-social-google-plus"&amp;gt;&amp;amp;nbsp;&amp;lt;/a&amp;gt;
                                {% endif %}
                            &amp;lt;/div&amp;gt;
                        &amp;lt;/div&amp;gt;
                    {% endif %}
                &amp;lt;/div&amp;gt;
                &amp;lt;h3 class="hs-author-listing-header"&amp;gt;Recent Posts&amp;lt;/h3&amp;gt;
            {% endif %}

        &amp;lt;h3&amp;gt; &amp;lt;a href="https://news.besocialscene.com/topic/whiskey-content"&amp;gt; Whiskey Content  &amp;lt;/a&amp;gt;&amp;lt;/h3&amp;gt; 
            {% for content in whiskey_content %}
                &amp;lt;div class="post-item"&amp;gt;
                    {% if not simple_list_page %}
                                                &amp;lt;a href="{{content.absolute_url}}"&amp;gt;
                         
                        &amp;lt;div class="post-body clearfix"&amp;gt;

                       
                         {% if content.post_list_summary_featured_image %}
                                &amp;lt;div class="hs-featured-image-wrapper"&amp;gt;
                                  
                                        &amp;lt;img src="{{ content.post_list_summary_featured_image }}" class="hs-featured-image"  alt="{{ content.name }}"&amp;gt;
                                    
                                &amp;lt;/div&amp;gt;
                        {% endif %}
                        &amp;lt;div class="custom-date"&amp;gt;
                        {{ content.publish_date_local_time.strftime('%d') }}
                        {{ content.publish_date_local_time.strftime('%B') }}
                        &amp;lt;/div&amp;gt;
                            
                        &amp;lt;div class="post-header"&amp;gt;
                            &amp;lt;h2&amp;gt;{{ content.name }}&amp;lt;/h2&amp;gt;
                        &amp;lt;/div&amp;gt;
                        
                        
                          &amp;lt;!--post summary--&amp;gt;
                         
                            
                        &amp;lt;/div&amp;gt;
                          &amp;lt;/a&amp;gt;  
                       
                                            
                            
                       
                    {% else %}
                        &amp;lt;h2 class="post-listing-simple"&amp;gt;&amp;lt;a href="{{content.absolute_url}}"&amp;gt;{{ content.name }}&amp;lt;/a&amp;gt;&amp;lt;/h2&amp;gt;
                    {% endif %}
                &amp;lt;/div&amp;gt;
            {% endfor %}
        &amp;lt;div class="view-all-articles"&amp;gt;
    &amp;lt;p class="cta-blog-design"&amp;gt; &amp;lt;a href="https://news.besocialscene.com/topic/whiskey-content" target="_blank" &amp;gt;View All Whiskey Articles&amp;lt;/a&amp;gt;&amp;lt;/p&amp;gt; 
 &amp;lt;/div&amp;gt;

            &amp;lt;h3&amp;gt; &amp;lt;a href="https://news.besocialscene.com/topic/tequila-content"&amp;gt;Tequila Content &amp;lt;/a&amp;gt; &amp;lt;/h3&amp;gt; 
            {% for content in tequila_content %}
                &amp;lt;div class="post-item"&amp;gt;
                    {% if not simple_list_page %}
                                                &amp;lt;a href="{{content.absolute_url}}"&amp;gt;
                         
                        &amp;lt;div class="post-body clearfix"&amp;gt;

                       
                         {% if content.post_list_summary_featured_image %}
                                &amp;lt;div class="hs-featured-image-wrapper"&amp;gt;
                                  
                                        &amp;lt;img src="{{ content.post_list_summary_featured_image }}" class="hs-featured-image"  alt="{{ content.name }}"&amp;gt;
                                    
                                &amp;lt;/div&amp;gt;
                        {% endif %}
                        &amp;lt;div class="custom-date"&amp;gt;
                        {{ content.publish_date_local_time.strftime('%d') }}
                        {{ content.publish_date_local_time.strftime('%B') }}
                        &amp;lt;/div&amp;gt;
                            
                        &amp;lt;div class="post-header"&amp;gt;
                            &amp;lt;h2&amp;gt;{{ content.name }}&amp;lt;/h2&amp;gt;
                        &amp;lt;/div&amp;gt;
                        
                        
                          &amp;lt;!--post summary--&amp;gt;
                         
                            
                        &amp;lt;/div&amp;gt;
                          &amp;lt;/a&amp;gt;  
                       
                                            
                            
                       
                    {% else %}
                        &amp;lt;h2 class="post-listing-simple"&amp;gt;&amp;lt;a href="{{content.absolute_url}}"&amp;gt;{{ content.name }}&amp;lt;/a&amp;gt;&amp;lt;/h2&amp;gt;
                    {% endif %}
                &amp;lt;/div&amp;gt;
            {% endfor %}
        &amp;lt;div class="view-all-articles"&amp;gt;
    &amp;lt;p class="cta-blog-design"&amp;gt; &amp;lt;a href="https://news.besocialscene.com/topic/tequila-content" target="_blank" &amp;gt;View All Tequila Articles&amp;lt;/a&amp;gt;&amp;lt;/p&amp;gt; 
 &amp;lt;/div&amp;gt;
        &amp;lt;h3&amp;gt; &amp;lt;a href="https://news.besocialscene.com/topic/air-water-show-content"&amp;gt;Air &amp;amp; Water Show &amp;lt;/a&amp;gt; &amp;lt;/h3&amp;gt; 
            {% for content in air_water_show_content %}
                &amp;lt;div class="post-item"&amp;gt;
                    {% if not simple_list_page %}
                                                &amp;lt;a href="{{content.absolute_url}}"&amp;gt;
                         
                        &amp;lt;div class="post-body clearfix"&amp;gt;

                       
                         {% if content.post_list_summary_featured_image %}
                                &amp;lt;div class="hs-featured-image-wrapper"&amp;gt;
                                  
                                        &amp;lt;img src="{{ content.post_list_summary_featured_image }}" class="hs-featured-image"  alt="{{ content.name }}"&amp;gt;
                                    
                                &amp;lt;/div&amp;gt;
                        {% endif %}
                        &amp;lt;div class="custom-date"&amp;gt;
                        {{ content.publish_date_local_time.strftime('%d') }}
                        {{ content.publish_date_local_time.strftime('%B') }}
                        &amp;lt;/div&amp;gt;
                            
                        &amp;lt;div class="post-header"&amp;gt;
                            &amp;lt;h2&amp;gt;{{ content.name }}&amp;lt;/h2&amp;gt;
                        &amp;lt;/div&amp;gt;
                        
                        
                          &amp;lt;!--post summary--&amp;gt;
                         
                            
                        &amp;lt;/div&amp;gt;
                          &amp;lt;/a&amp;gt;  
                       
                                            
                            
                       
                    {% else %}
                        &amp;lt;h2 class="post-listing-simple"&amp;gt;&amp;lt;a href="{{content.absolute_url}}"&amp;gt;{{ content.name }}&amp;lt;/a&amp;gt;&amp;lt;/h2&amp;gt;
                    {% endif %}
                &amp;lt;/div&amp;gt;
            {% endfor %}
        &amp;lt;div class="view-all-articles"&amp;gt;
    &amp;lt;p class="cta-blog-design"&amp;gt; &amp;lt;a href="https://news.besocialscene.com/topic/air-water-show-content" target="_blank" &amp;gt;View Air &amp;amp; Water Show Articles&amp;lt;/a&amp;gt;&amp;lt;/p&amp;gt; 
 &amp;lt;/div&amp;gt;



        &amp;lt;h3&amp;gt; &amp;lt;a href="https://news.besocialscene.com/topic/halloween-content"&amp;gt; Halloween Content &amp;lt;/a&amp;gt; &amp;lt;/h3&amp;gt; 
            {% for content in halloween_content %}
                &amp;lt;div class="post-item"&amp;gt;
                    {% if not simple_list_page %}
                                                &amp;lt;a href="{{content.absolute_url}}"&amp;gt;
                         
                        &amp;lt;div class="post-body clearfix"&amp;gt;

                       
                         {% if content.post_list_summary_featured_image %}
                                &amp;lt;div class="hs-featured-image-wrapper"&amp;gt;
                                  
                                        &amp;lt;img src="{{ content.post_list_summary_featured_image }}" class="hs-featured-image"  alt="{{ content.name }}"&amp;gt;
                                    
                                &amp;lt;/div&amp;gt;
                        {% endif %}
                        &amp;lt;div class="custom-date"&amp;gt;
                        {{ content.publish_date_local_time.strftime('%d') }}
                        {{ content.publish_date_local_time.strftime('%B') }}
                        &amp;lt;/div&amp;gt;
                            
                        &amp;lt;div class="post-header"&amp;gt;
                            &amp;lt;h2&amp;gt;{{ content.name }}&amp;lt;/h2&amp;gt;
                        &amp;lt;/div&amp;gt;
                        
                        
                          &amp;lt;!--post summary--&amp;gt;
                         
                            
                        &amp;lt;/div&amp;gt;
                          &amp;lt;/a&amp;gt;  
                       
                                            
                            
                       
                    {% else %}
                        &amp;lt;h2 class="post-listing-simple"&amp;gt;&amp;lt;a href="{{content.absolute_url}}"&amp;gt;{{ content.name }}&amp;lt;/a&amp;gt;&amp;lt;/h2&amp;gt;
                    {% endif %}
                &amp;lt;/div&amp;gt;
            {% endfor %}
        &amp;lt;div class="view-all-articles"&amp;gt;
    &amp;lt;p class="cta-blog-design"&amp;gt; &amp;lt;a href="https://news.besocialscene.com/topic/halloween-content" target="_blank" &amp;gt;View All Halloween Articles&amp;lt;/a&amp;gt;&amp;lt;/p&amp;gt; 
 &amp;lt;/div&amp;gt;
        &amp;lt;h3&amp;gt;&amp;lt;a href="https://news.besocialscene.com/topic/new-years-content"&amp;gt;New Years Content&amp;lt;/a&amp;gt;&amp;lt;/h3&amp;gt; 
            {% for content in new_years_content %}
                &amp;lt;div class="post-item"&amp;gt;
                    {% if not simple_list_page %}
                                                &amp;lt;a href="{{content.absolute_url}}"&amp;gt;
                         
                        &amp;lt;div class="post-body clearfix"&amp;gt;

                       
                         {% if content.post_list_summary_featured_image %}
                                &amp;lt;div class="hs-featured-image-wrapper"&amp;gt;
                                  
                                        &amp;lt;img src="{{ content.post_list_summary_featured_image }}" class="hs-featured-image"  alt="{{ content.name }}"&amp;gt;
                                    
                                &amp;lt;/div&amp;gt;
                        {% endif %}
                        &amp;lt;div class="custom-date"&amp;gt;
                        {{ content.publish_date_local_time.strftime('%d') }}
                        {{ content.publish_date_local_time.strftime('%B') }}
                        &amp;lt;/div&amp;gt;
                            
                        &amp;lt;div class="post-header"&amp;gt;
                            &amp;lt;h2&amp;gt;{{ content.name }}&amp;lt;/h2&amp;gt;
                        &amp;lt;/div&amp;gt;
                        
                        
                          &amp;lt;!--post summary--&amp;gt;
                         
                            
                        &amp;lt;/div&amp;gt;
                          &amp;lt;/a&amp;gt;  
                       
                                            
                            
                       
                    {% else %}
                        &amp;lt;h2 class="post-listing-simple"&amp;gt;&amp;lt;a href="{{content.absolute_url}}"&amp;gt;{{ content.name }}&amp;lt;/a&amp;gt;&amp;lt;/h2&amp;gt;
                    {% endif %}
                &amp;lt;/div&amp;gt;
            {% endfor %}
        &amp;lt;div class="view-all-articles"&amp;gt;
    &amp;lt;p class="cta-blog-design"&amp;gt; &amp;lt;a href="https://news.besocialscene.com/topic/new-years-content" target="_blank" &amp;gt;View All New Year Articles&amp;lt;/a&amp;gt;&amp;lt;/p&amp;gt; 
 &amp;lt;/div&amp;gt;

        &amp;lt;h3&amp;gt; &amp;lt;a href="https://news.besocialscene.com/topic/st_patricks_day_content"&amp;gt; St. Patrick's Day Content &amp;lt;/a&amp;gt;&amp;lt;/h3&amp;gt; 
            {% for content in st_patricks_day_content %}
                &amp;lt;div class="post-item"&amp;gt;
                    {% if not simple_list_page %}
                                                &amp;lt;a href="{{content.absolute_url}}"&amp;gt;
                         
                        &amp;lt;div class="post-body clearfix"&amp;gt;

                       
                         {% if content.post_list_summary_featured_image %}
                                &amp;lt;div class="hs-featured-image-wrapper"&amp;gt;
                                  
                                        &amp;lt;img src="{{ content.post_list_summary_featured_image }}" class="hs-featured-image"  alt="{{ content.name }}"&amp;gt;
                                    
                                &amp;lt;/div&amp;gt;
                        {% endif %}
                        &amp;lt;div class="custom-date"&amp;gt;
                        {{ content.publish_date_local_time.strftime('%d') }}
                        {{ content.publish_date_local_time.strftime('%B') }}
                        &amp;lt;/div&amp;gt;
                            
                        &amp;lt;div class="post-header"&amp;gt;
                            &amp;lt;h2&amp;gt;{{ content.name }}&amp;lt;/h2&amp;gt;
                        &amp;lt;/div&amp;gt;
                        
                        
                          &amp;lt;!--post summary--&amp;gt;
                         
                            
                        &amp;lt;/div&amp;gt;
                          &amp;lt;/a&amp;gt;  
                       
                                            
                            
                       
                    {% else %}
                        &amp;lt;h2 class="post-listing-simple"&amp;gt;&amp;lt;a href="{{content.absolute_url}}"&amp;gt;{{ content.name }}&amp;lt;/a&amp;gt;&amp;lt;/h2&amp;gt;
                    {% endif %}
                &amp;lt;/div&amp;gt;
            {% endfor %}
        &amp;lt;div class="view-all-articles"&amp;gt;
    &amp;lt;p class="cta-blog-design"&amp;gt; &amp;lt;a href="https://news.besocialscene.com/topic/st-patricks-day-content" target="_blank" &amp;gt;View All St. Patrick's Articles&amp;lt;/a&amp;gt;&amp;lt;/p&amp;gt; 
 &amp;lt;/div&amp;gt;


        &amp;lt;/div&amp;gt;

        {% if not simple_list_page %}
 &amp;lt;!-- Numbered Pagination --&amp;gt;

{% endif %}
        
  &amp;lt;/div&amp;gt;
 &amp;lt;/div&amp;gt;

{% endif %}&lt;/PRE&gt;&lt;P&gt;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/3688"&gt;@Jsum&lt;/a&gt;&amp;nbsp;, just in case you need this code as well&lt;/P&gt;</description>
      <pubDate>Thu, 20 Jun 2019 21:33:46 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/Filter-blog-content-module-according-to-blog-tags-topics-on/m-p/276446#M12706</guid>
      <dc:creator>chrissa0000</dc:creator>
      <dc:date>2019-06-20T21:33:46Z</dc:date>
    </item>
    <item>
      <title>Re: Filter blog content module according to blog tags/topics on listing template</title>
      <link>https://community.hubspot.com/t5/CMS-Development/Filter-blog-content-module-according-to-blog-tags-topics-on/m-p/276457#M12707</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/63495"&gt;@chrissa0000&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Try this. You have to place this into a custom module (call it custom blog list):&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;FONT color="#FF6600"&gt;{#################################################}
{###############      Macros       ###############}
{#################################################}&lt;/FONT&gt;

&lt;FONT color="#999999"&gt;{# -- Macro: renders post markup --
   -- Loops selected blog to output post item markup -- #}&lt;/FONT&gt;
&lt;FONT color="#FF6600"&gt;{%&lt;FONT color="#FF9900"&gt; macro post_feed(&lt;FONT color="#3366FF"&gt;x&lt;/FONT&gt;)&lt;/FONT&gt; %}&lt;/FONT&gt;
&lt;BR /&gt;  &lt;FONT color="#999999"&gt;{# -- if "x" isn't "contents" change it to a custom feed  -- #}&lt;/FONT&gt;
&lt;FONT color="#FF6600"&gt;  {% &lt;FONT color="#FF9900"&gt;unless &lt;FONT color="#3366FF"&gt;x&lt;/FONT&gt; == &lt;FONT color="#3366FF"&gt;contents&lt;/FONT&gt;&lt;/FONT&gt; %}
   {% &lt;FONT color="#FF9900"&gt;set &lt;FONT color="#3366FF"&gt;x&lt;/FONT&gt; = blog_recent_tag_posts('default', &lt;FONT color="#3366FF"&gt;x&lt;/FONT&gt;, 5)&lt;/FONT&gt; %}
  {% &lt;FONT color="#FF9900"&gt;endunless&lt;/FONT&gt; %}&lt;/FONT&gt;

  &lt;FONT color="#FF6600"&gt;{% for &lt;FONT color="#3366FF"&gt;content&lt;/FONT&gt; in &lt;FONT color="#3366FF"&gt;x&lt;/FONT&gt; %}&lt;/FONT&gt;
    &lt;FONT color="#999999"&gt;{# -- post-item --
       -- Outermost wrapper for your post items -- #}&lt;/FONT&gt;
    &lt;FONT color="#339966"&gt;&amp;lt;div &lt;FONT color="#008000"&gt;class="&lt;FONT color="#808000"&gt;post-item&lt;/FONT&gt;"&lt;/FONT&gt;&amp;gt;&lt;/FONT&gt;

      &lt;FONT color="#999999"&gt;{# -- if not simple_list_page --
         -- checking to see if uses is accessing a "simple list" version of your blog list -- #}
    &lt;/FONT&gt;  &lt;FONT color="#FF6600"&gt;{% &lt;FONT color="#FF9900"&gt;if not &lt;FONT color="#3366FF"&gt;simple_list_page&lt;/FONT&gt;&lt;/FONT&gt; %}&lt;/FONT&gt;

      &lt;FONT color="#999999"&gt;{# -- post-item link --
         -- wrapping every element in post item -- #}&lt;/FONT&gt;
      &lt;FONT color="#339966"&gt;&amp;lt;a &lt;FONT color="#008000"&gt;href="&lt;FONT color="#FF6600"&gt;{{&lt;FONT color="#3366FF"&gt;content&lt;/FONT&gt;&lt;FONT color="#00CCFF"&gt;.absolute_url&lt;/FONT&gt;}}&lt;/FONT&gt;"&lt;/FONT&gt;&amp;gt;&lt;/FONT&gt;         

        &lt;FONT color="#999999"&gt;{# -- post-body --
           -- uses loop item featured image, date, and name -- #}&lt;/FONT&gt;
        &lt;FONT color="#339966"&gt;&amp;lt;div &lt;FONT color="#008000"&gt;class="&lt;FONT color="#808000"&gt;post-body clearfix&lt;/FONT&gt;"&lt;/FONT&gt;&amp;gt;&lt;/FONT&gt; 

          &lt;FONT color="#999999"&gt;{# -- loop item image -- #}&lt;/FONT&gt;
          &lt;FONT color="#FF6600"&gt;{% &lt;FONT color="#FF9900"&gt;if &lt;FONT color="#3366FF"&gt;content&lt;/FONT&gt;&lt;FONT color="#00CCFF"&gt;.post_list_summary_featured_image&lt;/FONT&gt;&lt;/FONT&gt; %}&lt;/FONT&gt;

            &lt;FONT color="#999999"&gt;{# image wrapping div -- #}&lt;/FONT&gt;
            &lt;FONT color="#008000"&gt;&amp;lt;div class="&lt;FONT color="#808000"&gt;hs-featured-image-wrapper&lt;/FONT&gt;"&amp;gt;&lt;/FONT&gt;

              {&lt;FONT color="#999999"&gt;# -- image element -- #}&lt;/FONT&gt;
              &lt;FONT color="#339966"&gt;&amp;lt;img &lt;FONT color="#008000"&gt;src="&lt;FONT color="#FF6600"&gt;{{ &lt;FONT color="#3366FF"&gt;content&lt;/FONT&gt;.&lt;FONT color="#00CCFF"&gt;post_list_summary_featured_image&lt;/FONT&gt; }}&lt;/FONT&gt;"&lt;/FONT&gt; &lt;FONT color="#008000"&gt;class="&lt;FONT color="#808000"&gt;hs-featured-image&lt;/FONT&gt;"  alt="&lt;FONT color="#FF6600"&gt;{{ &lt;FONT color="#3366FF"&gt;content&lt;/FONT&gt;&lt;FONT color="#00CCFF"&gt;.name&lt;/FONT&gt; }}"&lt;/FONT&gt;&lt;/FONT&gt;&amp;gt;
            &amp;lt;/div&amp;gt;&lt;/FONT&gt;
          &lt;FONT color="#FF6600"&gt;{% &lt;FONT color="#FF9900"&gt;endif&lt;/FONT&gt; %}&lt;/FONT&gt;

          &lt;FONT color="#999999"&gt;{# -- date wrapping div -- #}&lt;/FONT&gt; 
          &lt;FONT color="#339966"&gt;&amp;lt;div &lt;FONT color="#008000"&gt;class="&lt;FONT color="#808000"&gt;custom-date&lt;/FONT&gt;"&lt;/FONT&gt;&amp;gt;&lt;/FONT&gt;

            &lt;FONT color="#999999"&gt;{# -- publish date "day" -- #}&lt;/FONT&gt;
            &lt;FONT color="#FF0000"&gt;{{ &lt;FONT color="#3366FF"&gt;content&lt;/FONT&gt;&lt;FONT color="#00CCFF"&gt;.publish_date_local_time&lt;/FONT&gt;&lt;FONT color="#FF9900"&gt;.strftime(&lt;FONT color="#666699"&gt;'%d'&lt;/FONT&gt;)&lt;/FONT&gt; }}&lt;/FONT&gt;

            &lt;FONT color="#999999"&gt;{# -- publish date "month" -- #}&lt;/FONT&gt;
            &lt;FONT color="#FF6600"&gt;{{ &lt;FONT color="#3366FF"&gt;content&lt;FONT color="#00CCFF"&gt;.publish_date_local_time&lt;/FONT&gt;&lt;FONT color="#FF9900"&gt;.strftime(&lt;FONT color="#666699"&gt;'%B'&lt;/FONT&gt;)&lt;/FONT&gt;&lt;/FONT&gt; }}&lt;/FONT&gt;
          &lt;FONT color="#339966"&gt;&amp;lt;/div&amp;gt;
&lt;/FONT&gt;
          &lt;FONT color="#999999"&gt;{# -- name h2 wrapping div -- #}&lt;/FONT&gt;
          &lt;FONT color="#339966"&gt;&amp;lt;div &lt;FONT color="#008000"&gt;class="&lt;FONT color="#808000"&gt;post-header&lt;/FONT&gt;"&lt;/FONT&gt;&amp;gt;&lt;/FONT&gt;

            &lt;FONT color="#999999"&gt;{# -- h2 wrapping loop item name -- #}&lt;/FONT&gt;
            &lt;FONT color="#339966"&gt;&amp;lt;h2&amp;gt;&lt;FONT color="#FF6600"&gt;{{ &lt;FONT color="#3366FF"&gt;content&lt;/FONT&gt;&lt;FONT color="#00CCFF"&gt;.name&lt;/FONT&gt; }}&lt;/FONT&gt;&amp;lt;/h2&amp;gt;&lt;/FONT&gt;
          &lt;FONT color="#339966"&gt;&amp;lt;/div&amp;gt;           
        &amp;lt;/div&amp;gt;
      &amp;lt;/a&amp;gt;&lt;/FONT&gt;
      &lt;FONT color="#FF6600"&gt;{% &lt;FONT color="#FF9900"&gt;else&lt;/FONT&gt; %}&lt;/FONT&gt;
        &lt;FONT color="#339966"&gt;&amp;lt;h2 &lt;FONT color="#008000"&gt;class="&lt;FONT color="#808000"&gt;post-listing-simple&lt;/FONT&gt;"&lt;/FONT&gt;&amp;gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#339966"&gt;          &amp;lt;a &lt;FONT color="#008000"&gt;href="&lt;FONT color="#FF6600"&gt;{{&lt;FONT color="#3366FF"&gt;content&lt;/FONT&gt;&lt;FONT color="#00CCFF"&gt;.absolute_url&lt;/FONT&gt;}}&lt;/FONT&gt;"&lt;/FONT&gt;&amp;gt;&lt;FONT color="#FF6600"&gt;{{ &lt;FONT color="#3366FF"&gt;content&lt;FONT color="#00CCFF"&gt;.name&lt;/FONT&gt;&lt;/FONT&gt; }}&lt;/FONT&gt;&amp;lt;/a&amp;gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#339966"&gt;        &amp;lt;/h2&amp;gt;&lt;/FONT&gt;
      &lt;FONT color="#FF6600"&gt;{% &lt;FONT color="#FF9900"&gt;endif&lt;/FONT&gt; %}  &lt;/FONT&gt;          
    &lt;FONT color="#339966"&gt;&amp;lt;/div&amp;gt;&lt;/FONT&gt;
&lt;FONT color="#FF6600"&gt;  {% &lt;FONT color="#FF9900"&gt;endfor&lt;/FONT&gt; %}
{% &lt;FONT color="#FF9900"&gt;endmacro&lt;/FONT&gt; %}&lt;/FONT&gt;


&lt;FONT color="#FF6600"&gt;{#################################################}
{###############      Output       ###############}
{#################################################}&lt;/FONT&gt;

&lt;FONT color="#339966"&gt;&amp;lt;div &lt;FONT color="#008000"&gt;class="&lt;FONT color="#808000"&gt;blog-section&lt;/FONT&gt;"&lt;/FONT&gt;&amp;gt;
  &amp;lt;div &lt;FONT color="#008000"&gt;class="&lt;FONT color="#808000"&gt;blog-listing-wrapper cell-wrapper&lt;/FONT&gt;"&lt;/FONT&gt;&amp;gt;&lt;/FONT&gt;
    
    &lt;FONT color="#999999"&gt;{# -- simple_list_page --
       -- indicates the "blog/all" page, which is a list of links to every blog post -- #}
   &lt;/FONT&gt; &lt;FONT color="#339966"&gt;&amp;lt;div &lt;FONT color="#008000"&gt;class="&lt;/FONT&gt;&lt;FONT color="#808000"&gt;post-listing&lt;/FONT&gt;&lt;FONT color="#FF6600"&gt;{% &lt;FONT color="#FF9900"&gt;if&lt;/FONT&gt; &lt;FONT color="#3366FF"&gt;simple_list_page&lt;/FONT&gt; %}&lt;/FONT&gt;&lt;FONT color="#808000"&gt;-simple&lt;/FONT&gt;&lt;FONT color="#FF6600"&gt;{% &lt;FONT color="#FF9900"&gt;endif&lt;/FONT&gt; %}&lt;/FONT&gt;&lt;FONT color="#008000"&gt;"&lt;/FONT&gt;&amp;gt;&lt;/FONT&gt;
      
      &lt;FONT color="#999999"&gt;{# -- If 'topic' is true --
         -- This code will ONLY show IF on a topic url (www.website.com/blog/topic/topic_name) #}
     &lt;FONT color="#FF6600"&gt; {% &lt;FONT color="#FF9900"&gt;if&lt;/FONT&gt; &lt;FONT color="#3366FF"&gt;topic&lt;/FONT&gt; %}
  &lt;/FONT&gt;&lt;/FONT&gt;    
        &lt;FONT color="#999999"&gt;{# -- calling post_feed macro, sending blog contents to it -- #}&lt;/FONT&gt;
        &lt;FONT color="#FF6600"&gt;{{ &lt;FONT color="#FF9900"&gt;post_feed(&lt;FONT color="#3366FF"&gt;contents&lt;/FONT&gt;)&lt;/FONT&gt; }}&lt;/FONT&gt;
      
     &lt;FONT color="#999999"&gt; {# -- Else if 'topic' is not true --
         -- This shows UNLESS on a topic url (www.website.com/blog/topic/topic_name) #}
 &lt;/FONT&gt;     &lt;FONT color="#FF6600"&gt;{% &lt;FONT color="#FF9900"&gt;else&lt;/FONT&gt; %}&lt;/FONT&gt;
        
        &lt;FONT color="#999999"&gt;{# -- calling post_feed macro, sending a topic slug to it -- #}&lt;/FONT&gt;
        &lt;FONT color="#FF6600"&gt;{{ &lt;FONT color="#FF9900"&gt;post_feed(&lt;FONT color="#666699"&gt;'whiskey-content'&lt;/FONT&gt;)&lt;/FONT&gt; }}
        {{ &lt;FONT color="#FF9900"&gt;post_feed(&lt;FONT color="#666699"&gt;'tequila-content'&lt;/FONT&gt;)&lt;/FONT&gt; }}
        {{ &lt;FONT color="#FF9900"&gt;post_feed(&lt;FONT color="#666699"&gt;'air-water-show-content'&lt;/FONT&gt;)&lt;/FONT&gt; }}
        {{ &lt;FONT color="#FF9900"&gt;post_feed(&lt;FONT color="#666699"&gt;'halloween-content'&lt;/FONT&gt;)&lt;/FONT&gt; }}
        {{ &lt;FONT color="#FF9900"&gt;post_feed(&lt;FONT color="#666699"&gt;'new-years-content'&lt;/FONT&gt;)&lt;/FONT&gt; }}
        {{ &lt;FONT color="#FF9900"&gt;post_feed(&lt;FONT color="#666699"&gt;'st-patricks-day-content'&lt;/FONT&gt;)&lt;/FONT&gt; }}
      
      {% &lt;FONT color="#FF9900"&gt;endif&lt;/FONT&gt; %}&lt;/FONT&gt;
&lt;FONT color="#339966"&gt;    &amp;lt;/div&amp;gt;
  &amp;lt;/div&amp;gt; 
&amp;lt;/div&amp;gt;&lt;/FONT&gt;&lt;/PRE&gt;
&lt;P&gt;save the module. on the left side bar of the custom module editor scroll down until you see "Template Usage". Copy the "usage snippet". my looks like this:&lt;/P&gt;
&lt;PRE&gt;{% module "module_156107096182818" path="/Khoatic_Modules/background Color test" %}&lt;/PRE&gt;
&lt;P&gt;Go to the listing template editor of the blog content module in the blog template, delete every thing (or comment it out) and paste your custom module snippet.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I built a macro that takes one argument. if that argument is "contents" it will loop through the "contents" variable. Otherwise it will try to use that argument as a topic slug for filtering a custom feed. Notice how I call the macro several times with a unique topic slug each time.&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 20 Jun 2019 23:30:47 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/Filter-blog-content-module-according-to-blog-tags-topics-on/m-p/276457#M12707</guid>
      <dc:creator>Jsum</dc:creator>
      <dc:date>2019-06-20T23:30:47Z</dc:date>
    </item>
  </channel>
</rss>

