Hello,
is it possible to hide a specific part of a filter? I want to have a country filter on one of my collections but the country filter is added to all collections, therefore I want to hide it everywhere else but the desired collection.
Example of a collection where it should be hidden: https://jumping-fitness.com/collections/trampolines
Example of a collection where it should be visible: https://jumping-fitness.com/collections/training
We are talking about the third filter option, “Country”.
Theme is Local.
Any ideas?
Thank you!
Josef
Hi @JosefAdamec ,
This is Stacy from the Searchanise Team, the app that provides search and filters for Shopify stores.
If you are not against using third-party apps, you can add filters on collections powered by Searchanise, and then set up individual set of filters for you collection pages. Here are the instructions: https://docs.searchanise.io/setting-up-filter-trees/
There are also a lot of other useful features to help you improve user experience on your website, ultimately leading to increased sales and conversion. Check out our app listing to learn more.
Best,
Stacy
hi @JosefAdamec
Yes, you can custom-dev this in the theme. All you have to do is create a metafield at the collection level.
Check the existence of metafield value and implement the hidden logic, which will remove the country filter.
Hope this will help…
Hello @SearchaniseTeam ,
Thank you for your reply. I would prefer a free solution, but if I don’t find it, I will consider your app.
Hello @gr_trading ,
since I have somewhat limited knowledge of coding, I am gonna need more direction.
Thank you
You can create a collection template and write the code as below.
{% if collection.template_suffix == "hide-country" %}
{% endif %}
Please refer to the below URL, how to create template in Shopify
https://help.shopify.com/en/manual/online-store/themes/theme-structure/templates
Now edit the code of the filter and facet put the class on it and assign the template to the collection.
Still facing issues in implementing the solution request you to connect over WhatsApp, details are in BIO.