How to hide empty collections in the Studio theme menu?

Topic summary

Goal: hide empty collections from the Studio theme’s mega menu so only collections with products appear.

Proposed approach: add conditional logic in the collection list template to check collection.products_count and render only when not zero. Suggested file/path: Online Store > Edit code > theme files > collection-list.json. A code snippet and a screenshot were provided and are central to the proposed fix.

Status/Issues:

  • The original poster shared their collection-list section code and asked exactly where to place the conditional, noting prior attempts failed.
  • Another participant reported the same solution didn’t work for them and asked which Studio version is being used, implying possible version-specific differences.
  • Unclear whether the guidance targets the mega menu items specifically versus the collection list section, which may affect results.

Open items/Next steps:

  • Confirm Studio theme version and whether the mega menu is populated by navigation items or a collection list section.
  • Provide precise insertion point for the conditional in the relevant template/section powering the menu.
  • Validate if collection.products_count is available in the context being used. Discussion remains unresolved.
Summarized with AI on December 22. AI used: gpt-5.

@Maygin_Theresa welcome to the Shopify Community,

You just need to add a conditional logic to the collection list template in the theme files

Online Store > Edit Theme Code > Theme files > collection-list.json

{% if collection.products_count != 0 %}
no collection will show untill it have products.
{% else %}
all the products will load if they have products.
{% endif %}

Thanks

thanks