How can I hide specific collections in Ride Theme?

Is there a way I can edit the code tied to my Collections file to conceal specific Collections from the customer-facing view? (I know I can exclude a Collection from a Sales Channel, but we are hoping for some code workaround.)

Any help would be appreciated!

7ac63e.myshopify.com

Josh

Hello @boldlythreaded ,

You can try to follow these steps to hide a collection:

Go to Online Store β†’ Themes β†’ Actions β†’ Edit code

Go to Temlates β†’ collection-template.liquid file β†’ look for the section that loops through and displays the collections. It might look something like this:

{% for collection in collections %}
  
{% endfor %}

Within the loop, you can add conditions to exclude specific collections from being displayed, like this:

{% for collection in collections %}
  {% unless collection.tags contains 'exclude' %}
    
  {% endunless %}
{% endfor %}

Save changes.

Hope this can help. Let us know if you need any further support.

Ali Reviews team.

@irene-vintage Awesome! I have confirmed your code / solution works, but the file you referenced was absent from my Templates folder.
So, I ended up using the following code line, taken from your code, and much to my surprise it worked- the named collections are now hidden from the collections page.
Thanks again for the assist!!!

{% unless collection.handle contains 'men' or collection.handle contains 'women' %}

Great to know @boldlythreaded .

In case you need any further support, please don’t be hesitate to contact us.

Wish you all the best with your store.

Ali Reviews team