Hide certain tags from filter and hide some sort options

vtabellion
New Member
5 0 0

Hello guys,

 

I have 2 main issues on my Shopify :

 

       1/ I am not able to hide certain tags in a filter

 

I tried the two solutions mentioned here : https://community.shopify.com/c/technical-q-a/hide-tags-from-filter-in-dawn-theme/m-p/1900089 being to add {% unless value contains 'Homme' %} or {% assign tag_value = value.value %}  {% unless tag_value contains 'Homme' %} in facets.liquid but it's not working.

 

I would like to hide the tags "Homme" and "Femme". 

 

I tried other solutions but they are quite old and I did not find the corresponding folder. 

 

I am currently using craft version 12.0.0

 

               2/ I am not able to definitely hide some sort options

 

I would like to only keep featured, price low to high and high to low.

 

I did this https://ezfycode.com/blog/remove-options-from-the-collection-filter-shopify and I also added the following in theme.liquid :

 

<style>
.facet-filters__field .select__select option[value="created-ascending"],
.facet-filters__field .select__select option[value="best-selling"],
.facet-filters__field .select__select option[value="title-ascending"],
.facet-filters__field .select__select option[value="title-descending"],
.facet-filters__field .select__select option[value="created-descending"]{
display: none!important;
}
</style>

 

It's almost working but on Safari for iPhone if you change the sort options they all appear again and on a computer with Safari and Chrome if you change the sort options the "sort by" title will move on the left to make some room for the sort options with a long name even if they are not displayed.

 

I put this here (sorry it's in French): https://lisererouge.com/

 

I hope it's clear otherwise let me know.

 

Thank you very much for your help! 🙂

 

Vincent

Reply 1 (1)

vtabellion
New Member
5 0 0

If someone has an idea please 🙏