-
Notifications
You must be signed in to change notification settings - Fork 0
Core Concepts
A primer on how HOF thinks. Read this once and the rest of the docs make 10x more sense.
A facet is a single filter dimension. "Price." "Color." "Category." "On sale." It's one axis along which a user can narrow a list.
A facet set is a group of facets that work together on a results page. The classic example: a shop sidebar with Price + Color + Size + In Stock.
Most cheap filter plugins build their queries on the fly. Every time a user moves a slider, the plugin runs a fresh WP_Query with tax_query and meta_query joins. This is fine for 50 products. It implodes at 5,000.
HOF maintains a custom index table that flattens facet data into a fast lookup structure. Filter clicks hit the index, not your products table. You can have 100,000 products and filters still feel instant.
flowchart LR
A[Product / Post created or updated] --> B[Indexer hook fires]
B --> C[(HOF index tables)]
D[Visitor clicks facet] --> E[Frontend signal updates]
E --> F[REST request to HOF endpoint]
F --> C
C --> G[Filtered IDs returned]
G --> H[Listing re-renders]
The indexer is event-driven — it updates when a product changes, not on a cron. (A scheduled full re-index is available for cases where the event hook misses something.)
HOF ships 16 facet types. A representative handful:
| Type | Use case |
|---|---|
| Checkbox | Multi-select categories, tags, attributes |
| Radio | Single-select (rare but useful) |
| Dropdown | Long lists where space matters |
| Range Slider | Price, weight, numeric meta |
| Date Range | Events, posts by published date |
| Search | Free-text within the result set |
| Hierarchy | Nested taxonomies (category > sub-category) |
| Color Swatch | Variation colors, attribute swatches |
| Toggle | Boolean filters ("In stock", "On sale") |
→ Full Facet Types catalog with all 16 types, a decision tree, and the shared config schema.
Every facet selection updates the URL. That means:
- Shareable filtered views. Send a link, get the same filter state.
- Browser back/forward works. Like the web should.
- SEO-friendly. Crawlers see real URLs, not fragments.
- 🏗️ Architecture — the technical stack
- 👨💻 Developer Guide — hooks, APIs, extending
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