Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
Displaying blog post tags and hiding certain ones
New Contributor
Oct 18, 2019 2:45 PM
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) %} <ul> {% for item in my_tags %} {% if !item.name is containing "Digital Transformation" or "Retail" %} <h3><a href="{{ blog_tag_url(group.id, item.slug) }}">{{ item }}</a></h3> {% endif %} {% endfor %} </ul>
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!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content