How to set up filters?
The theme supports storefront filtering by Shopify. In the following article, you can learn how to apply filters for collection pages.
Last updated
The theme supports storefront filtering by Shopify. In the following article, you can learn how to apply filters for collection pages.
Last updated
Read the initial documentation for filter configuration requirements.
Then, you can follow the listed steps to display filters:
In your Shopify admin -> Online Store -> Navigation, scroll down to the "Collection and search filters" and open the Shopify Search & Discovery app:
Then, you can press the "Filters" item in the side menu to navigate to the needed chapter:
Press the "Add filter" button to view all the available filters:
In the "Source" selector, you can choose filters that should be available in a storefront.
Add each filter one by one.
In the "Filter label" field, paste the name of the filter if necessary.
Save changes.
Note! If you need to display filters for product options such as color, size, style, etc., add the desired options for products in Shopify admin -> Products:
The filters will be displayed in the same order as you set them up at the back end. If you need to change the filter's position in the sidebar, change the order in the app by dragging filters up or down:
Now you can go to Theme Editor -> Collections -> Product Grid -> Filtering and Sorting to make sure the filters displaying have been approved:
Previously in this article, you learned how to customize the standard filters on the storefront based on product information added in your admin, such as product vendor, type, and product variants. However, Shopify’s software has some limitations, allowing you to add up to three product variants in the admin for use as filters on the storefront. So, what if you need to add more filters that do not match product variants or there is no need to display them as product variants in your store? This can be achieved using metafields.
To display custom filters in a store, follow the steps below:
Create a metafield in your Shopify admin -> Settings -> Custom data -> Metafield definitions -> Products by hitting the "Add definition" button.
We are going to create a metafield to display a filter by gender. An example of the metafield settings can be viewed below:
Name - Gender
Namespace and key - my_fields.gender
Single line text - One value
Go to "Products" in your admin and assign filter items to products using the created metafield.
Add an appropriate value to each product that needs filtering.
To display the filter on the storefront, add a filter to the list of filters in the Shopify Search & Discovery app. Go to Apps, select the app, and press the "Filters" tab. Then, hit the "Add filter" button.
Next, select the filter in the "Product metafields" block by pressing the "Source" field.
Save the settings.
Now, you can view the filter on the storefront: