You can create your own filters (custom filters) and use them in the Search Results Widget or Filters on collections. A custom filter is based on a standard or other custom filter. It can be especially helpful for filters based on tags.
For example, some of the product brands in your store are set in the Vendor field, while others are assigned through tags. To create a single filter for these products and merge the filters’ values, you need to add a custom filter based on Vendor and tags.
Creating a filter
- Go to Filters > Filter list > Filters tab.
- Click Add filter.
- Type in the Filter title of the new filter and select the parent filters on which you want to base the new one.
- The toggle Add new values from parent filters set to On means that all new values created later for the parent filters will also be added to the values of the new filter.
- The toggle Keep parent filters set to On means that parent filters will remain in the Filter list.
Refresh the page to see the filter values and Settings. Optionally, hide the filter values or change their Display name and save the changes.
These values won’t be excluded from standard filters.
That’s it. The new custom filter is now displayed on the storefront.
You can create new filters based on parent filters — the number of parent filters is unlimited. To merge several filters, just follow the steps described in Creating a filter section.
Setting up a custom filter
To adjust the setting of a custom filter, click on the pencil icon next to the filter. Managing the filter Status (Active or Hidden) is not available in the Filter tree settings.
On the General tab, you can change the values’ Display name and Status (Active or Hidden).
On the Settings tab, you can change:
- Filter title
- Parent filters (Based on)
- Sort values by:
- Default – the default sorting that is set for all filters’ values
- Name (asc) – the sorting by names by ascending (if a display name is set, then it is considered as a name)
- Name (desc) – the sorting by names by descending
- Number of items – the sorting by the number of products by descending
- Manual – the sorting according to the order set in the Position column in the list of filter values. The Position column is shown if the Manual sorting is set.
- Appearance (you can also read Setting up color and size filters on Shopify):
- Default – values as text
- Color – color values as color swatches
- Size – size values as text in frames
- Selection operator. By default, multiple filters work by the “OR” logic: products matching any of the selected filter options are shown in the search results (see also How to set up the “AND” logic for the filter values)
- Desktop view (see also How to display collapsible filters closed up)
- More count – the number of visible values. If the actual number of filter values exceeds this number, the Show more button will be displayed
- Show on mobile toggle
- Add new values from parent filters – set to toggle to On, if you new filter values created later for the parent filters to be added to the new filter.
Apply the changes.
Deleting a custom filter
Click on the pencil icon next to the filter and hit the Delete filter button.