HeirloomHelp CenterContact support

Filters and sorting

Filters help customers narrow a collection or a search, for example to products under $20, or to one producer or region. Sorting lets them change the order of the products. Heirloom shows both on collection pages and on the search results page.

Set up filters

Heirloom shows the filters that you create in Shopify’s Search & Discovery app. The theme doesn’t create filters itself, so start in the app: install it, and then add filters for the product details that your customers care about, such as availability, price, product type, vendor or a product metafield.

Learn more about setting up filters in Shopify’s Help Center.

Choose where filters show

The Filter layout setting of the Collection section, or of the Search section on the search page, decides where the filters sit on screens 990 pixels wide and larger.

Steps:

  1. From your Shopify admin, go to Online Store > Themes.
  2. Find Heirloom, and then click Edit theme.
  3. Open a collection template, and then click the Collection section.
  4. In Filter layout, select Sidebar, Horizontal bar, Drawer or Automatic.
  5. Click Save.
  • Sidebar lists the filter groups in a column beside the products. Each group opens and closes, and changes apply as soon as a customer clicks a value.
  • Horizontal bar shows the first five filter groups as dropdown buttons above the products, with an All filters button that opens every group in a panel.
  • Drawer shows a Filters button above the products. The filters open in a panel, and the products keep the full width of the page.
  • Automatic shows a horizontal bar when there are two filters or fewer, and a sidebar when there are more. Use it when different collections have different numbers of filters. Phones use a drawer.

On screens narrower than 990 pixels, filters always open in a panel from a Filters button, whatever the layout.

Filter settings

The Filters block controls how each filter group looks. To change it, click Filters inside the Collection or Search section.

  • Show filters: Requires filters set up in Shopify Search and Discovery. Hidden automatically when none exist. On by default.

Layout

  • Open groups: Groups with a selected value always start open. Options: None, First group, First three groups, All groups. Default: First three groups.
  • Values per group: The rest sit behind a Show more link. From 4 to 20, default 8.
  • Show product counts: Shows how many products match each value. On by default.
  • Values with no products: What happens to values that no product matches with the current filters. Show as unavailable grays them out. Hide leaves them out of the list. Options: Show as unavailable, Hide. Default: Show as unavailable.
  • Show value search: Adds a search box to groups with more than 15 values. On by default.
  • Keep sidebar in view: With the Sidebar layout, keeps the filters in view while customers scroll through a long collection. On by default.

Swatches

  • Swatch shape: The shape of color and pattern swatches. Options: Circle, Square. Default: Circle.
  • Swatch size: The size of color and pattern swatches. Options: Small, Medium, Large. Default: Medium.
  • Show swatch labels: Off shows swatches only, with names kept for screen readers. On by default.

Behavior

  • Show price slider: Adds a slider with two handles to the price filter. The From and To fields always show, so customers can type an exact price. On by default.
  • Drawer updates: Button waits until shoppers press Show products. Options: On Show products button, On every change. Default: On Show products button.

Price filter

When you add a price filter in the Search & Discovery app, customers see From and To fields in your store’s currency. With Show price slider on, they can also drag the two handles of a slider. A handle left at either end means no limit on that side.

Swatches

Filters for color or pattern can show as swatches instead of a list of names. Swatches use the color or image that’s set for each value in your Shopify admin. Use Swatch shape, Swatch size and Show swatch labels to change how they look.

Long lists of values

Each filter group shows the number of values that you set in Values per group. A Show more link reveals the rest. When a group has more than 15 values, Show value search adds a search box so customers can find a value by typing.

Filters on phones

On phones, customers open the filters from a Filters button. The same panel opens from Filters in the Drawer layout, and from All filters in the Horizontal bar layout, on large screens too. Drawer updates decides when the products change in the panel:

  • On Show products button: customers choose several values, and the products update when they click Show products. The button shows the number of matching products as they choose.
  • On every change: the products update after each value.

Sorting

The Sort by menu in the toolbar lets customers order products by price, by date, by name or by best selling. Shopify provides the sort options. Before a customer sorts, products show in the collection’s own sort order, which you set on the collection in your Shopify admin.

To show or hide the menu, turn Show sort by on or off in the Toolbar block. Learn more about toolbar settings.

Applied filters

Each filter that a customer applies shows as a label above the products. Customers click a label to remove that filter, or Clear all to remove all of them. Clearing filters keeps the sort order. Use Applied filter labels in the Toolbar block to choose whether a label shows the filter name.

Without JavaScript

Filters and sorting work in every browser. If JavaScript doesn’t load, customers check the values that they want and click Apply, and the page reloads with the filtered products. On phones, and in the Drawer layout, the filters open in place from a Filters bar instead of a panel. The price slider and value search need JavaScript, so customers type a price in From and To.