Flow Theme - Hiding Tags From Drop-Down Menu

Dear Support

I have a large number of tags used in the back-end of our store. There is a tutorial I have found online, which shows how you can hide certain tags from appearing in the drop-down menu. Below you will find the original and the modified code, but when i have tested the code it it still displaying all of the tags and not hiding one of the tags β€˜FP’ as instructed.

Would there be any experienced coders who could take a look at the code below? and point me in the direction on what could be causing it not to work correctly as it should do.

Thanks in advance. Paul

Original Code:

{{ 'collections.filters.title_tags' | t }}

Modified Code:
{% assign exclude_tags = β€œFP” | split: β€˜,’ %}

{{ 'collections.filters.title_tags' | t }}
>
1 Like

Hi there @paulflaherty1 ,

Try remove the split: β€˜,’ from the first line of code so it will be

{% assign exclude_tags = β€œFP” %}

instead of

{% assign exclude_tags = β€œFP” | split: β€˜,’ %}

Hi Umair

Thank you for taking the time to respond to my post from yesterday.

I’ve tried that modification you have suggested to the code, but it is still pulling through all of the tags.

{% assign exclude_tags = β€œFP” %}

{{ 'collections.filters.title_tags' | t }}
Show More

From looking more at the template files. I am 99% certain it will be the following code that needs to be modified as this is where it takes the filters and displayed them in a drop-down menu,

Show More

Any help would be most appreciated, as I would like to try and solve this issue without having to use a Third Party Plugin which slows down the load speed of the site.

{% if section.settings.tags_enable %}
{{ 'collections.filters.title_tags' | t }} {% if collection.handle %} {% capture clearall %}/collections/{{ collection.handle }}{% endcapture %} {% elsif collection.products.first.type == collection.title %} {% assign clearall = collection.title | url_for_type %} {% elsif collection.products.first.vendor == collection.title %} {% assign clearall = collection.title | url_for_vendor %} {% endif %} {{ 'collections.filters.clear_all' | t }} {% if collection.all_tags != blank %}
    {% for tag in collection.all_tags %}
  • {{ tag }}
  • {% endfor %}
{% endif %}

Hi there,

looking for the same… Is there a solution?

Thanks