Support Center

How do I create subcategories of products?

Last Updated: May 22, 2012 12:40PM EDT

There are many ways to present subcategories of products in Shopify, and only one way to manage them. The only way to manage subcategories of products in Shopify is to use product tags.

Ways to present subcategories of products

You can get creative in how you present your subcategories of products in Shopify. We'll speak of 3 ways in this article:

We have illustrated those methods below:

Ways to present subcategories

Before we delve into to presentation aspect, we'll explain how to manage subcategories of products in Shopify.

There's only one way to manage subcategories of products in Shopify

All methods of presenting subcategories of products in Shopify share those two requirements: that you use collections for your main categories and that you use product tags for your subcategories.

The link to a subcategory of products in Shopify is constructed like so:

We will use one and the same example throughout our discussion. Suppose we want to have two main categories of products in our shop: Women and Men. The Women category of products will contain all products for women, and the Men category of products will contain all products for men. Within those categories, we want to have these subcategories: tops, dresses, accessories, shoes and pants.

There are 2 steps in setting up those categories and subcategories.

  1. Create collections (smart or custom) for all your main categories, here: Women and Men. This part of the work is done under the Collections tab in your shop admin.

  2. Add as product tag those different words to relevant products: tops, dresses, accessories, shoes, pants. Add the product tag 'pants' to all pants, the product tag 'accessories' to all accessories products, and so on. This work is done on the individual product pages in your shop admin.

Example of a product page in your shop admin for a dress:

How do you link to a main category?

The link to a main category of products in Shopify is a link to a collection page. The following link points to main category Women, where Women is (as it needs to be) a collection, with the handle 'women':

/collections/women

How do you link to a subcategory?

The link to a subcategory of products in Shopify is a link to a collection page filtered with a product tag. The following link points to the subcategory Dresses within the category Women, where Women is a collection with handle 'women' and the handleized product tag that filters that collection is 'dresses':

/collections/women/dresses

Let's deal with the presentation now.

First method or presenting subcategories: using dropdown menus

Not all themes support dropdown menus. Look up this list to see if your theme supports them.

If your theme supports them, head over to your Navigation page in your shop admin, and beging by editing your Main Menu. To your Main Menu, add links to your main categories of products, that is, links to your collections. Following up with our previous example, our Main Menu will look like this:

Once done with the above, create a link list for each category. Name the link list after the category name (the parent link) so that both match. Then, populate those link lists with links to filtered collections. Using our same old example, the Women link list will look like this:

Need help with troubleshooting your dropdown menus? Head over here.

I am done here. Bring me back up ↑

Second method or presenting subcategories: using clickable buttons

Go to Themes → Template Editor. Locate the file collection.liquid under Templates in the left-hand-side pane. Click on 'collection.liquid' to open the collection.liquid template in the online code editor. Below your collection description — or above it, as you wish — paste the code you'll find here. Then save.

I am done here. Bring me back up ↑

Third method or presenting subcategories: using a select element as submenu

Go to Themes → Template Editor. Locate the file collection.liquid under Templates in the left-hand-side pane. Click on 'collection.liquid' to open the collection.liquid template in the online code editor. Below your collection description — or above it, as you wish — paste the code you'll find here. Use either one or the other snippet. Then save.

I am done here. Bring me back up ↑

Contact Us

  • Or call 1.888.746.7439
    (local number: 1.613.688.3623)
    Phone Support Hours
    • Monday - Friday 9am - 9pm EST
    • Saturday 9am - 5pm EST
    • Sunday Closed