Dawn / Suppress search from collection pages

Hi All,

I am the owner/designer of ourhatsdeservebetter.com I have set up filters and have now a vertical filters bar on all my collection pages. I understood that it is challenging to have such bar in other pages than collection’s. Therefore, what I would like is just delete the search icon/bar from all my collection pages in order to force my customers to use the filter bar instead of the search icon/bar on those pages.

Is there a simple way to achive this?

Tks Eric

@bibigab - hello, do you want to remove this search bar?

Yes, together with the icon, but only on collection pages…

@bibigab - add this css to the end of theme.liquid file before and check

{% if template contains 'collection' %}
.header__search{display: none; visibility:hidden;}
.search-modal{display: none; visibility:hidden;}
{% endif %}

Hi Suyash. Just tried it but both Icon & bar still showing

@bibigab - try this updated code

{% if template contains 'collection' %}

{% endif %}

This one works like a charm. A big tks. Eric

@bibigab - welcome, do let me know if you need any more updates, you have my email below.

Tks Suyash. Will do so. Have a nice day