Filters

This block enables one to add filters and apply general settings regarding the filter's appearance.

Collections -> Product grid -> Add block -> Filters

In order to display filters in the sidebar section, you should create them all in Shopify Admin -> Apps -> Search & Discovery app. Learn more about filters here.

If you need to set settings for an individual filter block, you can add a “Filter settings” block and assign it to the corresponding filter. How to configure the “Filter settings” block, you can read here.

Section settings

You can choose the “Default state” of the block: open, closed, fixed, or without a title.

Content

In the “Layout” dropdown, one can choose the columns limit for filters: 1, 2, 3 columns, or a row. On the “Max column size” scale from 0 to 30, you can choose how many items should be shown in one column.

How to add filters in Shopify Admin

To display storefront filtering, set up filters in your Shopify Admin -> Apps. Here you can use the Shopify Search & Discovery app.

  • Select the Search & Discovery app from the list of apps.

  • Then, choose the “Filters” item in the side panel of the Admin and press the “Add filter” button:

  • Now you can choose the required filters from the list of the “Source” drop-down:

Add each filter one by one.

  • We have added five filters in the app: Availability, Color, Size, Price, and Vendor:

  • As a final step, we added the “Filters” block, and this is what we have got:

How to add custom filters

You can add custom filters using Metafields. Filters will be displayed for the content types:

  • Text (Single line text)

  • Number (integer, decimal)

  • True or false

Check more information here.

In order to create a custom filter, follow the steps below:

Step 1

  • Go to your Shopify Admin -> Settings -> Custom data -> Metafields -> Products.

  • Click “Add definition” and create a product metafield definition. Save changes.

This is an example of the metafield format:

  • Name = the name of a metafield

  • Namespace and key = use a unique definition for each metafield

  • Description = add a description of the metafields that will be shown at the backend only

  • Content type = Text (Single line text), Number (integer, decimal), or True or false

Step 2

  • Go to your Shopify Admin -> Products. For each product, add a value to the corresponding Metafield:

  • Save changes.

Step 3

  • In Shopify Admin -> Apps, use the Shopify Search & Discovery app to add Metafields. How to use the app, you can read above.

  • Choose the custom filter in the “Source” drop-down:

  • Save changes.

Last updated

Was this helpful?