Filters

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

circle-info

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

circle-exclamation

In order to display filters in the sidebar section, add the desired ones in Shopify Admin -> Apps -> Search & Discovery app. Learn more about filters herearrow-up-right.

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 herearrow-up-right.

Section settings

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

circle-exclamation

Content

In the “Layout” dropdown, one can choose the column 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.

circle-exclamation

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 herearrow-up-right.

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

Step 1

  • Go to your Shopify Admin -> Settings -> Metafields and metaobjects -> 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?