Hi,
on my collection pages I want to hide collections that have no products. is there a code I can implement? Because I have alot of suppliers so I don’t want to hide it in the actually shopify collections in case I do get that brand.
https://luxurymrkt.com/collections?page=5
thank you
1 Like
Hello @Luxurymrkt
- In your Shopify Admin go to online store > themes > actions > edit code
- Find sections > main-list-collections.liquid and search collection-list class.
Remove this code.
{%- for collection in collections -%}
{% if collection.products_count > 0 %}
- {% render 'card-collection', card_collection: collection, media_aspect_ratio: section.settings.image_ratio, columns: 3 %}
{% endif %}
{%- endfor -%}
Than add this code.
{%- for collection in collections -%}
{% if collection.products_count > 0 %}
- {% render 'card-collection', card_collection: collection, media_aspect_ratio: section.settings.image_ratio, columns: 3 %}
{% endif %}
{%- endfor -%}
I would like to do the exact same thing in the Supply theme. Are you able to help?
https://bluxeboutique.ca/collections
Those code blocks are the same 
Here’s another thread that describes how to hide Collection blocks with no Collection. Maybe this will work for you: Re: Dawn theme - Hide collection list on collection page if empty - Shopify Community