How to filter your Shopify products based on category metafields

by Alfredo Pantoja

Category metafields allow you to add a ton of relevant product information. They provide standardized values for your products, allowing them to perform better in sales channels, and marketplaces such as Google shopping and Amazon.

They're great for organizing your store, setting up automated collections, and facilitating customer browsing through filters.

Add a category to your products

If you haven't done so already, make sure all of your products have a "Category" set.

Category metafields map to specific product categories in Shopify's Standard Product Taxonomy

When you assign a standard category, it unlocks a set of pre-defined category metafields. Each category metafield comes with related, default entries. Additionally, you can connect these to your variant options.

For example, if you add the product category Apparel & Accessories > Clothing > Clothing Tops > Shirts, then you can add category metafields for size, neckline, sleeve length type, top length type, age group, fabric, target gender, clothing features, and color. You can use color as a variant option and add colors such as black and red.

You'll see the "Category" field in the admin page of your product. Shopify Magic might suggest a category for you, but feel free to search for the best match.

Set the category metafield values of your choice

Once you select your category, you will now see a section in your product admin page named "Category metafields". Here you can set the values for whichever category metafields you wish to use.

Shopify Magic will suggest values that you can click on to accept.

Install the search and discovery app

The app can be installed here. It's free!

Set the filter within the app

In the Search & Discovery app:

  1. Click on the "Customize filters" button
  2. Click on the "Add filter" button
  3. Click on the "+ Select source" button.
  4. Category metafields will show in the "Select source" dropdown as long as at least one product has a value entered for the metafield. Click on the one of your choice.
  5. Choose your preferred logic. By default, choosing filter values from the same filter is an OR condition that can increase the number of results. For example, choosing Red and Green values from a Color filter returns all the products that are red or green. Certain filter types can use an AND condition for their filter values instead.

Add as many filters as you like! Your customers will love the browsing experience.