Hiding Subcollections Craft theme

Topic summary

Hiding empty subcollections in the Shopify Craft theme. The poster asks for a code-based method to suppress/display subcollections only when they contain products, and guidance on exactly where in the theme files to place the code.

Follow‑ups clarify they plan to add “twig code” into template files and ask whether doing so would automatically hide empty subcollections. They also request step‑by‑step instructions and a concrete solution.

No code snippets, examples, or file paths were provided in the thread. No alternative approaches or theme settings were discussed.

Outcome/status: No solution or instructions have been shared yet; the request remains open. Key unanswered points include the exact implementation details, which theme templates/sections to edit, and whether the proposed template code would auto‑update to hide empty subcollections.

Summarized with AI on December 20. AI used: gpt-5.

Could anyone give me the coding needed to hide subcollections on Craft theme when they’re empty? Also where I would need to place that code?

Any help would greatly appreciated.

Thank you!

Hi,

That would be great! Once I add the twig code to template files, will this automatically update subcollections to hide if empty?

Thank you!

Could you let me know what I need to do to make this happen?

If you could respond with a solution that would be great.