How to exclude a specific tag from tag filter drop down menu in specific collection page?

arksaivi
Shopify Partner
13 0 0

There are two collections that have separate pages. I want these collections should not be shown in the filter category drop down menu. also when open two collections then don't show other tags in filter dropdown exclude this.PNGexlude cross tags.PNG

Replies 8 (8)

Dan-From-Ryviu
Shopify Partner
6904 1303 1330

Hi @arksaivi 

What's the theme you are using? 

- Helpful? Like or Accept solution, - Coffee Tips or Paypal Tips
- Ryviu - Product Reviews app, collect product reviews, import reviews from AliExpress, Amazon, Etsy, Shopee and Walmart and CSV.
- Lookfy app: Create Image Lookbook, Photo Gallery with product hotspots
- Enjoy 1 month of Shopify for $1. Sign up now

arksaivi
Shopify Partner
13 0 0

Dawn Theme latest version

Dan-From-Ryviu
Shopify Partner
6904 1303 1330

You can try go to Online store >Themes > Edit code > open main-collection-product-grid.liquid file, find this line of code 

 

<option
  value="{{ option.value | escape }}"
  {% if option.value == sort_by %}
    selected="selected"
  {% endif %}
>
  {{ option.name | escape }}
</option>

 

Replace with this code 

{% for tag in collection.all_tags %}
  {% unless tag == 'tag 1' or tag=='tag2' %}      
      <option
        value="{{ option.value | escape }}"
        {% if option.value == sort_by %}
          selected="selected"
        {% endif %}
      >
        {{ option.name | escape }}
      </option>
  {% endunless %}
{% endfor %}    

Please replace tag 1, tag 2 in the code with the tags that you don't want to add and add or tag == "your tags" for each tag

Screenshot 2023-12-25 at 15.45.40.png

- Helpful? Like or Accept solution, - Coffee Tips or Paypal Tips
- Ryviu - Product Reviews app, collect product reviews, import reviews from AliExpress, Amazon, Etsy, Shopee and Walmart and CSV.
- Lookfy app: Create Image Lookbook, Photo Gallery with product hotspots
- Enjoy 1 month of Shopify for $1. Sign up now

arksaivi
Shopify Partner
13 0 0

Thank you ! but No working it should be default on collection page no sort _by condition....  

Dan-From-Ryviu
Shopify Partner
6904 1303 1330

Do you mean from the dropdown menu or collection list page?

- Helpful? Like or Accept solution, - Coffee Tips or Paypal Tips
- Ryviu - Product Reviews app, collect product reviews, import reviews from AliExpress, Amazon, Etsy, Shopee and Walmart and CSV.
- Lookfy app: Create Image Lookbook, Photo Gallery with product hotspots
- Enjoy 1 month of Shopify for $1. Sign up now

arksaivi
Shopify Partner
13 0 0

As given into above screen shot.

shop2222.JPG

As above I want to hide this category from Shop page ( all collection) and 
regal page.JPG

this is single category page where showing category filter option which one I want to hide on this ( Regal thread ) collection page 

arksaivi
Shopify Partner
13 0 0

As shown in screen shot don't want to show Regal thread into  All collection page 
shop2222.JPG

Also I want to hide category option on single category page on collection/Regal-threat
regal page.JPG

arksaivi
Shopify Partner
13 0 0

please help me out