How to add custom filters on Shopify collection pages

In this article

What is Shopify Filtering?

Shopify filtering lets customers narrow down the products displayed on collection pages and in search results by selecting attributes such as size, colour, price, availability or material. Instead of scrolling through hundreds of products, a shopper ticks a few filter options in the sidebar or filter drawer and the collection page updates dynamic results in real time.


Filtering is different from sorting. Filters actively remove products that don't match the selected values, while sorting only reorders the same set of results, for example by price or newest first. Good product filters are core functionality for the user experience on a large store, and it pays off commercially: filter users convert at a far higher rate because they reach the right product faster.


All of this is powered by the free Shopify Search & Discovery app, which replaced the old filter settings that used to live under Online Store navigation in the Shopify admin. If you're building a wider discovery strategy, filtering sits alongside search, recommendations and your Shopify SEO as one system for helping people find products.



Standard Filters vs Custom Filters

The six standard filters

Every Shopify store can switch on six standard filters with a couple of clicks: Availability (in stock or out of stock), Category, Price, Product type, Tags and Vendor, which most shoppers read as brand. These cover the basics, but they rarely reflect how customers actually shop a specific catalogue.


Custom filter sources

Custom filters are built from your own product data, and there are three sources:


  • Product options: variant options like Size, Colour or Material automatically become available as filter sources. A t-shirt with Small, Medium and Large variants can power a Size filter with no extra configuration.
  • Metafields: a metafield is a custom data field you define once and populate per product or per variant. Metafield filters support single line text (including list types), integer, decimal, true or false, and metaobject reference definitions. This is how you filter by attributes Shopify doesn't know about natively, such as dietary tags, fabric weight or heel height.
  • Metaobjects: a metaobject is a reusable structured content entry. Referenced from a metafield, metaobjects give you centrally managed filter values, and they enable visual filters such as colour swatches and image chips on the collection page sidebar.

Since Shopify introduced its Standard Product Taxonomy, assigning a category to your products also generates category metafields automatically, things like Sleeve length for apparel or Material for furniture. These standard attributes make excellent filters because the values are consistent out of the box.



Shopify collection page with custom filters on mobile

How to Add Custom Filters on Shopify: Step by Step

Here is the full tutorial in four steps. You'll need a theme that supports storefront filtering (any current Online Store 2.0 theme does), the Search & Discovery app installed from the Shopify App Store, and product data worth filtering on: options, variants or metafields.


Step 1: Check your theme supports filtering

Go to Content, then Menus in your Shopify admin. If your theme doesn't support filtering, a message appears in the Collection and search filters section. Older third-party themes may need updating, or a developer can add the filter Liquid code to your collection template.


Step 2: Create the data your filter will use

If you're filtering by an existing product option like Size or Colour, skip ahead. Otherwise, create a metafield definition under Settings, then Custom data. Give the definition a clear name, choose a content type (single line text is the most common), and tick the filtering option so it's exposed as a filter source. Then populate the metafield values on each product. The bulk editor is the fastest way to fill in values across a large catalogue.


For visual swatch filters, create a metaobject definition first with a name field and a colour or image field, reference it from a product or variant metafield, and make sure both have storefront access enabled.


Step 3: Add the filter in Search & Discovery

Go to Apps, then Search & Discovery, and open the Filters tab. Click Add filter, click the Source field and select your product option, metafield or category attribute. Rename the customer-facing label if needed, choose the logic behaviour, then click Save. Drag filters into the order you want them displayed; put the filters customers use most at the top.


Step 4: Switch filtering on in your theme

In the theme editor, open a collection page and enable filtering in the Product grid section settings (and the Search results section for search pages). Your filters now display to customers, with the layout determined by your theme's template: a sidebar on desktop and a slide-out drawer on mobile in most themes.



Filter Limits, Sorting and Logic

Shopify's filtering has hard limits worth planning around. Your store can have a maximum of 25 filters in total, standard and custom combined, and each filter source can only be used once. Collections with more than 5,000 products won't display filters at all, so split oversized collections into smaller categories. A filter displays a maximum of 100 values on the storefront, though you can group similar values (for example Onyx, Ebony and Midnight into a single Black value) to stay under the cap. In practice, we'd rarely show more than 7 or 8 filters anyway; too many filter options overwhelms customers rather than helping them.


You also control sorting and logic per filter. Values sort automatically by default, with clever handling for sizes so XS sits before S, or you can sort manually and let Shopify Magic reorder values for you. For tag, metafield list and metaobject list filters, you choose between OR logic (show products matching any selected value) and AND logic (only products matching every selected value). Empty filter values can be hidden or pushed to the bottom in the app settings, which keeps out-of-stock noise away from customers.



Different Filters for Different Collections

A common question from merchants: can collection A show different filters to collection B? Natively, filters are configured store-wide, but Shopify only displays a filter on a collection page when its values actually apply to the products in that collection. A Heel height filter simply won't render on your outerwear collection if no products there carry the metafield.


For tighter control, create an alternative collection template in your theme, enable a different filter configuration in that template's settings, and assign specific collections to it. This template approach is the standard workaround and needs no custom code beyond the theme editor.



Filtering and SEO

One thing almost nobody covers: filters change your URLs. Every filter selection appends parameters like filter.v.availability to the collection URL, which can generate thousands of near-duplicate URL variations. Shopify handles this sensibly by canonicalising filtered pages back to the base collection URL, so filtered views don't dilute your rankings, but it also means filtered pages don't rank on their own. If a filtered view targets real search demand, say "red running shoes", build it as its own collection page with unique copy instead. Our guide to optimising Shopify collection pages for SEO covers this strategy in depth.


Well-structured filter data also feeds Google Shopping and AI search surfaces: the same product attributes that power filters strengthen your product feeds and structured data, where an increasing share of ecommerce discovery now happens for every customer.



When Native Filtering Isn't Enough

The Search & Discovery app covers most requirements, but there are cases where merchants outgrow it: filtering by computed or date-based values, price filters across multiple currencies (the native price filter only displays in your store's default currency), catalogues that blow past the 5,000-product collection limit, or complex B2B price list filtering on Shopify Plus.


At that point you have two routes. Third-party filter apps such as Boost or Fast Simon layer their own search and filtering infrastructure over your store and bypass several native limits. Or, for full control, a development team can build bespoke filtering with Shopify's Storefront API and the filter Liquid API, which is also the route for headless storefronts.


Where we'd draw the line on custom filtering

Our view after years of building filtering for Shopify Plus stores: exhaust metafields and metaobjects before you buy an app, and exhaust apps before you commission custom development. We've built entirely bespoke filtering solutions with the Storefront API, including GraphQL-driven filtering for requirements the native app couldn't touch, and the honest lesson from that experience is that most stores never needed to go that far. Custom filtering is the right call when the filter logic is genuinely unique to your business model, typically B2B catalogues and very large product databases. If your requirement is just "more product filters, a nicer user interface", metafields plus a well-configured theme gets you there for a fraction of the cost of a custom development project. Talk to our Shopify developers if you're weighing up the custom route.



Troubleshooting Shopify Filters

The most common setup issues, and their fixes:


  • Filters not showing at all: your theme doesn't support storefront filtering, filtering is disabled in the template settings, or the collection exceeds 5,000 products.
  • A filter missing values: the product variants in that collection don't carry the option or metafield values, or you've passed the 100-value display cap. Check the metafields are populated and grouped sensibly.
  • New values not appearing: Shopify's search index can take 24 to 48 hours to refresh. Re-saving the affected products usually forces a re-index.
  • Inconsistent options: "Colour" and "Color" used across different products create duplicate filter values. Standardise option names and tag spelling across the catalogue.
  • Price filter missing: customers browsing in a non-default currency won't see the price filter. This is a known native limitation, not a configuration error.