<?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: Blog Counter Post in CMS Development</title>
    <link>https://community.hubspot.com/t5/CMS-Development/Blog-Counter-Post/m-p/423432#M22076</link>
    <description>&lt;P&gt;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/175454"&gt;@Vitni&lt;/a&gt; Hm, it might have an issue with the accented letters. May need to use the slug instead of the name. The slug would be the hyphenated version of the tag that is used in the tag URL. Example: A tag named "Creative Marketing" would have a slug of "creative-marketing".&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;{% set all_tags = blog_tags('default', 250) %}
{% set my_tags = ['tag-name-slug', 'tag-name-slug', 'tag-name-slug'] %} // Replace the names here with the tag slug (this is the hyphenated version of the name that would show in the tag url)
  
&amp;lt;ul&amp;gt;  
  {% for item in all_tags %}
    {% if item.slug in my_tags %}
      &amp;lt;li class="{{ item.slug }}"&amp;gt;
        &amp;lt;a href="{{ blog_tag_url(group.id, item.slug) }}"&amp;gt;{{ item.name }}&amp;lt;span class="filter-link-count" dir="ltr"&amp;gt; ({{item.live_posts}}) &amp;lt;/span&amp;gt;&amp;lt;/a&amp;gt;
      &amp;lt;/li&amp;gt;
    {% endif %}
  {% endfor %}
&amp;lt;/ul&amp;gt;&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 30 Mar 2021 15:08:32 GMT</pubDate>
    <dc:creator>alyssamwilie</dc:creator>
    <dc:date>2021-03-30T15:08:32Z</dc:date>
    <item>
      <title>Blog Counter Post</title>
      <link>https://community.hubspot.com/t5/CMS-Development/Blog-Counter-Post/m-p/423177#M22061</link>
      <description>&lt;P&gt;Hello there,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We're trying to code a custom post filter via HubL Module. The links are working fine but we're taking a hard time to make the blog shows the correct number. Found a old post in the forum but it counts like&amp;nbsp;&lt;STRONG&gt;blog_total_pages&lt;/STRONG&gt; instead of the tags.&lt;/P&gt;&lt;P&gt;&amp;nbsp; &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;&lt;LI-CODE lang="markup"&gt;{% set my_tags = blog_tags('default', 250) %}
&amp;lt;ul&amp;gt;
{% for item in my_tags %}
  &amp;lt;li&amp;gt;&amp;lt;a href="{{ blog_tag_url(group.id, item.slug) }}"&amp;gt;{{ item }} ({{item.live_posts}})&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;
{% endfor %}
&amp;lt;/ul&amp;gt;&lt;/LI-CODE&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;&lt;P&gt;Even just pasting the &lt;STRONG&gt;{{item.live_posts}},&amp;nbsp;&lt;/STRONG&gt;the counter still doesn't work. Is there a specific HubL variables to list all our &lt;STRONG&gt;blog_tags&lt;/STRONG&gt; and be able to list them in separated &amp;lt;li&amp;gt;?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;EDIT: To make it simplier, here's our module right now:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;div class="widget-module"&amp;gt;
&amp;lt;ul&amp;gt;  
{% set my_tags = blog_tags('tag1', 'tag2', 'tag3', 3) %}
{% for item in my_tags %}
&amp;lt;/ul&amp;gt;
    
    &amp;lt;ul style="width:70%;margin:auto;font-size:18px;"&amp;gt;  
        &amp;lt;li class="tag1"&amp;gt;
          &amp;lt;a href="https://exampleblog.com/tag/tag1"&amp;gt;Tag 1&amp;lt;span class="filter-link-count" dir="ltr"&amp;gt; ({{item.live_posts}}) &amp;lt;/span&amp;gt;&amp;lt;/a&amp;gt;
        &amp;lt;/li&amp;gt;
      
        &amp;lt;li class="tag2"&amp;gt;
          &amp;lt;a href="https://exampleblog.com/tag/tag2"&amp;gt;Tag 2&amp;lt;span class="filter-link-count" dir="ltr"&amp;gt; ({{item.live_posts}}) &amp;lt;/span&amp;gt;&amp;lt;/a&amp;gt;
        &amp;lt;/li&amp;gt;

        &amp;lt;li class="tag3"&amp;gt;
          &amp;lt;a href="https://exampleblog.com/tag/tag3"&amp;gt;Tag 3&amp;lt;span class="filter-link-count" dir="ltr"&amp;gt; ({{item.live_posts}}) &amp;lt;/span&amp;gt;&amp;lt;/a&amp;gt;
        &amp;lt;/li&amp;gt;
    &amp;lt;/ul&amp;gt;

{% endfor %}
  &amp;lt;/div&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We found out {{item.live_posts}} is the blog counter but we can't manage it to work.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 30 Mar 2021 13:15:31 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/Blog-Counter-Post/m-p/423177#M22061</guid>
      <dc:creator>Vitni</dc:creator>
      <dc:date>2021-03-30T13:15:31Z</dc:date>
    </item>
    <item>
      <title>Re: Blog Counter Post</title>
      <link>https://community.hubspot.com/t5/CMS-Development/Blog-Counter-Post/m-p/423321#M22068</link>
      <description>&lt;P&gt;Hey&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/175454"&gt;@Vitni&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Welcome to the Community!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you for sharing this information and some context. I'll invite to this conversation a few experts that can share their thoughts with you.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hey&lt;SPAN&gt;&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/642"&gt;@mangelet&lt;/a&gt;&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/91608"&gt;@alyssamwilie&lt;/a&gt;&amp;nbsp;&lt;/SPAN&gt;&amp;nbsp;what would you advise in this case?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;
&lt;P&gt;Sharon&lt;/P&gt;</description>
      <pubDate>Tue, 30 Mar 2021 10:57:47 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/Blog-Counter-Post/m-p/423321#M22068</guid>
      <dc:creator>sharonlicari</dc:creator>
      <dc:date>2021-03-30T10:57:47Z</dc:date>
    </item>
    <item>
      <title>Re: Blog Counter Post</title>
      <link>https://community.hubspot.com/t5/CMS-Development/Blog-Counter-Post/m-p/423353#M22070</link>
      <description>&lt;P&gt;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/175454"&gt;@Vitni&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I tested the code you posted and it's working how it should on my end. Can you post a screenshot of what it's outputting for you? Are you using that exact code or did&amp;nbsp; you make any changes?&lt;/P&gt;</description>
      <pubDate>Tue, 30 Mar 2021 12:59:40 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/Blog-Counter-Post/m-p/423353#M22070</guid>
      <dc:creator>alyssamwilie</dc:creator>
      <dc:date>2021-03-30T12:59:40Z</dc:date>
    </item>
    <item>
      <title>Re: Blog Counter Post</title>
      <link>https://community.hubspot.com/t5/CMS-Development/Blog-Counter-Post/m-p/423370#M22071</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/91608"&gt;@alyssamwilie&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for the heads up. Yes, simply pasting the code works fine, but it lists all the tags we used like the image below:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot_1.png" style="width: 200px;"&gt;&lt;img src="https://community.hubspot.com/t5/image/serverpage/image-id/40123i318CC5F7459C9A91/image-size/small?v=v2&amp;amp;px=200" role="button" title="Screenshot_1.png" alt="Screenshot_1.png" /&gt;&lt;/span&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We'd like to make the code shows specific tags listed in red.&lt;/P&gt;&lt;P&gt;However, the bullets need to be customized too, so our module have a css with list-style-image from these &amp;lt;li&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot_2.png" style="width: 200px;"&gt;&lt;img src="https://community.hubspot.com/t5/image/serverpage/image-id/40125iF3CDF2BB20F278F1/image-size/small?v=v2&amp;amp;px=200" role="button" title="Screenshot_2.png" alt="Screenshot_2.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;All we need is to make this {{item_live_posts}} shows their specific count number. I edited my previous post with our html right now.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 30 Mar 2021 13:13:44 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/Blog-Counter-Post/m-p/423370#M22071</guid>
      <dc:creator>Vitni</dc:creator>
      <dc:date>2021-03-30T13:13:44Z</dc:date>
    </item>
    <item>
      <title>Re: Blog Counter Post</title>
      <link>https://community.hubspot.com/t5/CMS-Development/Blog-Counter-Post/m-p/423372#M22072</link>
      <description>&lt;P&gt;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/175454"&gt;@Vitni&lt;/a&gt;&amp;nbsp;The blog_tags function doesn't have a parameter for only showing particular tags so you would need a separate array to check against and then you'll only want a single li inside your for loop as the loop will print the content inside it for every item in the loop.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;{% set all_tags = blog_tags('default', 250) %}
{% set my_tags = ['Tag 1 Name', 'Tag 2 Name', 'Tag 3 Name'] %} // Replace the names here with the tag names you want listed
  
&amp;lt;ul&amp;gt;  
  {% for item in all_tags %}
    {% if item.name in my_tags %}
      &amp;lt;li class="{{ item.slug }}"&amp;gt;
        &amp;lt;a href="{{ blog_tag_url(group.id, item.slug) }}"&amp;gt;{{ item.name }}&amp;lt;span class="filter-link-count" dir="ltr"&amp;gt; ({{item.live_posts}}) &amp;lt;/span&amp;gt;&amp;lt;/a&amp;gt;
      &amp;lt;/li&amp;gt;
    {% endif %}
  {% endfor %}
&amp;lt;/ul&amp;gt;
&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 30 Mar 2021 13:26:31 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/Blog-Counter-Post/m-p/423372#M22072</guid>
      <dc:creator>alyssamwilie</dc:creator>
      <dc:date>2021-03-30T13:26:31Z</dc:date>
    </item>
    <item>
      <title>Re: Blog Counter Post</title>
      <link>https://community.hubspot.com/t5/CMS-Development/Blog-Counter-Post/m-p/423381#M22074</link>
      <description>&lt;P&gt;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/91608"&gt;@alyssamwilie&lt;/a&gt;&amp;nbsp;Thank you for the clarification. Replaced the tag names but unfortunately it returned a blank preview with no results.&lt;/P&gt;&lt;P&gt;Besides replacing the tags name, do I need to change something else?&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>Tue, 30 Mar 2021 13:39:13 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/Blog-Counter-Post/m-p/423381#M22074</guid>
      <dc:creator>Vitni</dc:creator>
      <dc:date>2021-03-30T13:39:13Z</dc:date>
    </item>
    <item>
      <title>Re: Blog Counter Post</title>
      <link>https://community.hubspot.com/t5/CMS-Development/Blog-Counter-Post/m-p/423432#M22076</link>
      <description>&lt;P&gt;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/175454"&gt;@Vitni&lt;/a&gt; Hm, it might have an issue with the accented letters. May need to use the slug instead of the name. The slug would be the hyphenated version of the tag that is used in the tag URL. Example: A tag named "Creative Marketing" would have a slug of "creative-marketing".&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;{% set all_tags = blog_tags('default', 250) %}
{% set my_tags = ['tag-name-slug', 'tag-name-slug', 'tag-name-slug'] %} // Replace the names here with the tag slug (this is the hyphenated version of the name that would show in the tag url)
  
&amp;lt;ul&amp;gt;  
  {% for item in all_tags %}
    {% if item.slug in my_tags %}
      &amp;lt;li class="{{ item.slug }}"&amp;gt;
        &amp;lt;a href="{{ blog_tag_url(group.id, item.slug) }}"&amp;gt;{{ item.name }}&amp;lt;span class="filter-link-count" dir="ltr"&amp;gt; ({{item.live_posts}}) &amp;lt;/span&amp;gt;&amp;lt;/a&amp;gt;
      &amp;lt;/li&amp;gt;
    {% endif %}
  {% endfor %}
&amp;lt;/ul&amp;gt;&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 30 Mar 2021 15:08:32 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/Blog-Counter-Post/m-p/423432#M22076</guid>
      <dc:creator>alyssamwilie</dc:creator>
      <dc:date>2021-03-30T15:08:32Z</dc:date>
    </item>
    <item>
      <title>Re: Blog Counter Post</title>
      <link>https://community.hubspot.com/t5/CMS-Development/Blog-Counter-Post/m-p/423441#M22079</link>
      <description>&lt;P&gt;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/91608"&gt;@alyssamwilie&lt;/a&gt;&amp;nbsp;Yes!!! It works like a charm.&amp;nbsp;Thank you so much for the solution &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 30 Mar 2021 15:22:06 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/Blog-Counter-Post/m-p/423441#M22079</guid>
      <dc:creator>Vitni</dc:creator>
      <dc:date>2021-03-30T15:22:06Z</dc:date>
    </item>
  </channel>
</rss>

