CMS Development


Displaying blog post tags and hiding certain ones

Hi there,


I am trying to display a list of all the tags used on hubspot blog posts but hide certain ones.


This is what I am currently doing:


     {{ blog_tags('default', 250) }}

      {% set my_tags = blog_tags('default', 250) %}
      {% for item in my_tags %}
        {% if ! is containing "Digital Transformation" or "Retail" %} 
          <h3><a href="{{ blog_tag_url(, item.slug) }}">{{ item }}</a></h3>
        {% endif %}

      {% endfor %}

I am trying to find a way to add an OR statement but it doesn't seem to work. Any way to edit this code and make it work or is there a different way? 

Thanks in advance!

HubSpot Alumni
HubSpot Alumni

Displaying blog post tags and hiding certain ones

I believe this post was a duplicate of Just adding the link here in case anyone comes across this post looking for a similar solution.

Leland Scanlan

HubSpot Developer Support