Skip to main content
This snippet changes how your theme shows the availability filter. Set up the filter first. The code below is for Horizon-based themes, such as Horizon and Fabric. Other themes need the same two changes where they list filter values and where they show active filters.
Search & Discovery shows a true or false filter as two options, Yes and No. These edits hide No and label Yes as Available, both in the filter list and in the active filter shown after a customer selects it.

Filter list

In snippets/list-filter.liquid, add this at the start of the loop over filter.values:
snippets/list-filter.liquid
In the same loop, pass value_label to the checkbox instead of value.label:
snippets/list-filter.liquid
Where the snippet prints the selected value next to the filter name, add a branch for the availability filter:
snippets/list-filter.liquid

Active filters

In snippets/filter-remove-buttons.liquid, show Available on the button that removes the filter:
snippets/filter-remove-buttons.liquid