-
Notifications
You must be signed in to change notification settings - Fork 0
Facet Type Radio
Ryan Shepherd edited this page May 21, 2026
·
3 revisions
✅ Shipped (experimental).
Single-select from a small list. The "pick exactly one" facet.
A list of mutually exclusive options. Users pick one (or none, with allow_clear). Useful when the data shape demands exclusivity.
- Sort order ("Newest", "Price low-high", "Popular")
- Shipping class ("Standard", "Express", "Pickup only")
- Stock state when you need a single mode (use Toggle for boolean on/off)
- Membership tier picker on directory sites
- More than ~6 options → use Dropdown
- Multiple values are valid → use Checkbox
- Binary on/off → use Toggle
{
"name": "shipping_class",
"type": "radio",
"label": "Shipping",
"source": "meta:_shipping_class",
"behavior": {
"allow_clear": true,
"default": null,
"show_count": true
},
"ui": {
"layout": "vertical",
"show_clear_button": true
}
}| Field | Values | Default | What |
|---|---|---|---|
behavior.allow_clear |
bool | true |
User can deselect to "no filter" |
behavior.default |
string | null
|
null |
Pre-selected value |
behavior.show_count |
bool | true |
Show match count per option |
ui.layout |
"vertical" | "horizontal"
|
"vertical" |
Stacking direction |
ui.show_clear_button |
bool | true |
Render an explicit "Clear" affordance |
?_hof_shipping_class=express
Single value. Empty/absent param = no filter (or default if configured).
apply_filters( 'hof_facet_radio_choices', $choices, $facet );
apply_filters( 'hof_facet_radio_default', $default, $facet );
apply_filters( 'hof_facet_radio_label', $label, $value, $facet );
do_action( 'hof_facet_radio_rendered', $facet );Result sort order:
{ "name": "sort", "type": "radio", "source": "virtual:sort",
"behavior": { "default": "relevance" },
"ui": { "layout": "horizontal" } }Single-select pricing tier:
{ "name": "tier", "type": "radio", "source": "taxonomy:pricing_tier",
"behavior": { "allow_clear": true, "show_count": true } }hooked on facets · Filtering, finally fun. · GitHub · hookedonfacets.com
Filtering, finally fun.
📖 docs
🧠 concepts
🎛️ facet types
- All Types
- Checkbox
- Radio
- Dropdown
- Range Slider
- Date Range
- Search
- Hierarchy
- Color Swatch
- Swipe Deck
- Spin the Wheel
- Intersection Matrix
- Ask
- Visual DNA
- Toggle
- Saved Bin
- Pagination
🔧 develop
🗺️ project