Limiting Tags in the Blog Detail Page

Hi everyone,

We have a client that has over 1,000+ blog posts. They have meticulously tagged each and every one. They have recently decided that there are tags they wish to make visible externally and hidden (internally) in the Blog Detail Page.
Is there a way perhaps we can control which tags are visible in the detail page?

Example:
Our tags for a post: Events, Sponsors, NGO, Pending Approval

In the front facing detail page, only Events, Sponsors, NGO would appear.
But inside the Hubspot post we can see Pending Approval was tagged in it.
Can we utilize a HubDB to list down external tags to appear?

Hey @justau,

I’d say it’s possible with some custom development.
An idea:
Create a custom post card/layout for the listing page which excludes certain tags.

Example code:

{% set excluded_tags = ["tag_a", "tag_b",...] %}
...
{% for content in contents %}
 ...
 {% for tag in content.tag_list %}
 {% if tag.name not in excluded_tags %}
 {{ tag.name }}
 {% endif %}
 {% endfor %}
 ...
{% endfor %}

You can also add a text field and enable the repeater functionality to let content editors type in the tag-name individually

example code:

{% set excluded_tags = [] %}
{% for in_tag in module.individually_excluded_tags %}
 {% unless loop.last %} 
 {% do excluded_tags.append("[in_tag]"~",") %}
 {% else %}
 {% do excluded_tags.append("[in_tag]") %}
{% endfor %}
...

best,

Anton