Skip to content

Facet Type Checkbox

SHEPDESIGN edited this page Jun 4, 2026 · 2 revisions

Facet Type: Checkbox

The workhorse. Multi-select filtering. The first facet type you'll reach for nine times out of ten.

what it is

A list of checkbox options. Users tick one or many. Results match items that have any (OR) or all (AND) of the selected values, depending on configuration.

when to use it

  • Product categories
  • Tags
  • Product attributes (size, brand, material)
  • Multi-value custom meta fields
  • Any data where multiple selections are valid

when not to use it

  • More than ~30 options without grouping → use Dropdown
  • Single-choice required → use Radio
  • Nested taxonomies → use Hierarchy
  • Visual selections like colors → use Color Swatch

configuration

{
  "name": "category",
  "kind": "taxonomy",
  "source": "product_cat",
  "display": "checkbox",
  "label": "Category",
  "settings": {
    "match": "any"
  }
}

options

Field Values Default What
kind "taxonomy" | "meta" | "field" Where the indexed values come from
source string The taxonomy slug or meta/field key (e.g. product_cat)
settings.match "any" | "all" "any" any = OR within the facet (match at least one selected value); all = AND (item must carry every selected value)

Counts are always rendered next to each option, and refresh based on the other active facets (drill-down counts share the resolver's subquery). There are no separate show_count / show_zero / sort / collapse settings in 1.0.0.

frontend behavior

  • Each click toggles the option and triggers a re-query against the index
  • The URL updates so the filter state is shareable and survives reload
  • Counts refresh based on the other active facets (cross-facet awareness)

URL state

?hof[category]=shirts,pants,shoes

Comma-separated term slugs. The any/all match mode lives in the facet config, not the URL.

examples

Multi-select product categories (OR within facet):

{ "name": "category", "kind": "taxonomy", "source": "product_cat",
  "display": "checkbox", "settings": { "match": "any" } }

All-must-match attribute filter (e.g. "shirts that are both organic and cotton"):

{ "name": "features", "kind": "taxonomy", "source": "pa_features",
  "display": "checkbox", "settings": { "match": "all" } }

Meta-sourced checkbox:

{ "name": "brand", "kind": "meta", "source": "_brand", "display": "checkbox" }

see also

  • Radio — single-select equivalent
  • Hierarchy — for nested taxonomies
  • Dropdown — same multi-select, different UI

Clone this wiki locally