Shopify Tech Tip: Add Custom Filters to Your Collections

Shopify Tech Tip: Add Custom Filters to Your Collections

3 min read

Last updated on 22 January 2025. If you spot anything incorrect, or dated, please email us.

This is an area of Shopify that is constantly evolving, and we think for the better. With Shopify making it increasingly less appealing to use tags for filters on the collection (understandable), we were forced to dig into how they actually want us to do it.

Custom filters on a Shopify collection

The answer is via metafields and metaobjects, and with an example below using their free Search & Discovery app to render the filter, it's actually quite straight forward once you understand the hierarchy and how things interrelate.

The first thing to understand is what metafields and metaobjects are:

  1. Metafield - A Shopify metafield is like an extra data field that allows you to add custom information to different parts of your store, such as products, collections, or orders. Think of it as a way to store details that don’t fit into the standard Shopify fields—like adding a "Material" or "Care Instructions" section to a product page. Metafields help you customize your store and display unique or specific information for your customers in a more flexible way.
  2. Metaobject - A Shopify metaobject is a tool that lets you create reusable pieces of custom content for your store. Unlike metafields, which are tied to specific products or pages, metaobjects work like templates for structured data—such as creating a "Size Guide" or "Brand Story" that can be used across multiple products or pages. This helps you keep your store consistent and organized while saving time by reusing the same content in different places.

When you're done with the steps below, you'll have a completely bespoke and elegantly content managed custom filter for your store like this when you're editing a product:

Custom filter metafield in a Shopify store admin

Tutorial – Creating Custom Search & Discovery Filters with MetaObjects

Step 1 - Create new filters in Shopify's meta structure

  1. Go to Content > Metaobjects and create a new MetaObject definition.
    1. Name it [filter name] Filter .
    2. Use the type Single line text.
    3. Leave it assigned to all products.
    4. Tick on Filtering for products and Smart collections.
  2. Populate the MetaObject with 3 or 4 test values.
  3. Go to Settings > Custom data > Metafields and click Add a definition.
    1. Name it [filter name] Filter Metafield.
    2. Add the field Metaobject and name it [filter name] Metaobject.
    3. Select List of entries
    4. Tick Use as filter in metaobject index.
  4. Go to Apps > Search & Discovery or install the app Search & Discovery by Shopify.
    1. Create a filter and in Source choose the metafield you created above ([filter name] Filter Metafield).
    2. Choose your OR / AND logic depending on how you want your filter to function and hit save.

Step 2 - How to add / edit Filter Options on Products

  1. Via the Product editing view in admin
    1. Scroll down to Metafields.
    2. Find and click on the filter you want to edit. If you named it intuitively as above, it should be something like [filter name] Filter.
    3. Choose entries to edit them or Add entry at the top to capture more.
  2. Via the Content menu
    1. Go to Content > MetaObjects.
    2. Go to the metafield you want to edit options in. It should be intuitively named if instructions above were followed.
    3. Click the input field to select or add more filters.

It's as easy as that. It should display in your collection's sidebar or wherever your filters display. If it doesn't it could be an old theme issue or the Search & Discovery app is not setup correctly.

If you have any questions, or need help, feel free to reach out to us.

Cover photo by Jim Kalligas

Ross Allchorn
Ross Allchorn

Hi, I'm Ross, an entrepreneur and a specialist in e-commerce. I founded ShopCreatify in 2015 and loving every second of working with our great ecommerce merchant clients.