Shopify themes, liquid, logos, and UX
I want to show headers for other collections at the same nest level on the collection page.
Navigation allows menu nesting down to 3 levels. E.g. Mens Clothing > Shirts > Long Sleeve Shirts. However it seems you can only display Subcollection headers for collections nested bellow the current collection page. Is there any way to show collections at the same nest level? E.g. If a customer selects "Long Sleeve Shirts" I would also like them to see other collections at the same nest level such as "Short Sleeve Shirts" and "Dress Shirts"
I hope that makes sense!
HI @nztack
To display headers for collections at the same nest level on a collection page, you can follow these steps:
1-Edit the Theme Code: Go to your Shopify Admin > Online Store > Themes > Customize > Edit Code.
2-Locate Collection Template: Find the template file for collections (collection.liquid or similar).
3-Query for Same-Level Collections: Use collections object in Liquid to fetch collections at the same nesting level. For example:
{% assign parent_collection = collections['parent-collection-handle'] %}
{% for collection in parent_collection.collections %}
<a href="{{ collection.url }}">{{ collection.title }}</a>
{% endfor %}
4-Filter by Parent: If necessary, organize collections in a way that you can logically fetch siblings (e.g., via manual collection grouping or tags).
5-Save and Test: Save changes and preview the collection page to confirm the sibling collections are displayed.
This method requires organizing collections consistently and possibly adding parent-level logic.
If you have other questions, I will also answer them.
Best regards,
Daisy
Hey Community! As the holiday season unfolds, we want to extend heartfelt thanks to a...
By JasonH Dec 6, 2024Dropshipping, a high-growth, $226 billion-dollar industry, remains a highly dynamic bus...
By JasonH Nov 27, 2024Hey Community! It’s time to share some appreciation and celebrate what we have accomplis...
By JasonH Nov 14, 2024