Djia Filters
AJAX filter system for any Bricks Query Loop. 15 filter elements, 9 filter types, pre-built index, shared cache and URL sync β for any CPT or WooCommerce archive.
Djia Filters adds a complete AJAX filtering system to Bricks Builder. Drag filter elements onto your page, connect them to a Query Loop and every interaction refreshes results without a page reload β URL synced, indexed and cached.
The Filter Container element is the parent wrapper for all filter elements. It connects to your Query Loop via a CSS selector.
Add a Filter Container
Drag the Filter Container element anywhere on your page β above, beside or below your listing.
Set the target selector
In the Filter Container controls, set Target Selector to the CSS class or ID of your Bricks Query Loop wrapper β e.g. .my-listing. Add a custom class to your Query Loop section first if needed.
Add filter elements inside
Place any of the 15 filter elements inside the Filter Container. Configure each one β choose the taxonomy, meta key or WooCommerce attribute.
Build the index (recommended)
For best performance run the index builder once. Go to Djia Bricks β Index β Rebuild or use WP-CLI. The index updates automatically on post save.
All 15 filter elements are available in the Bricks element panel under the Djia Filters category.
| Element | Description | Filter Types |
|---|---|---|
| Checkboxes | Multi-select filter with result counts per term | Taxonomy, Meta |
| Radio | Single-select filter for taxonomy and meta facets | Taxonomy, Meta |
| Select | Dropdown with optional multi-select mode | Taxonomy, WooCommerce |
| Color Swatch | Visual color circles per term β circle or square shape | Taxonomy, Woo attribute |
| Image Swatch | Image per term for fabric, texture or pattern filtering | Taxonomy, Woo attribute |
| Range Slider | Single dual-handle slider for numeric or price range | Meta, Woo price |
| Min / Max Input | Two number inputs for precise range entry | Meta, Woo price |
| Toggle Button | Button group for single or multi-select | Taxonomy, Meta |
| Search | Keyword search on post title and content | Keyword |
| Sort / Order | Order-by dropdown β date, title, price, custom meta | Sort |
| Active Tags | Displays active filters with individual clear buttons | All |
| Reset / Clear All | Clears all active filters in the container | All |
| Apply Button | Manual mode β results refresh only on click | Manual mode |
| Offcanvas Panel | Mobile slide-out filter drawer | Container |
| Filter Group | Collapsible wrapper for grouping related filters | Container |
| Type | Source | Notes |
|---|---|---|
| Taxonomy | Any registered taxonomy | AND/OR relation, hide empty, count display |
| Post Meta | Any post meta key | String, numeric or date comparison. ACF, Meta Box, Pods compatible |
| Woo Attribute | WooCommerce attribute (pa_colorβ¦) | Variation-aware stock counting |
| Woo Price | _price meta | Auto min/max boundary detection from indexed data |
| Woo Stock | stock_status | In stock, out of stock, on backorder |
| Woo Rating | _wc_average_rating | Minimum star rating filter |
| Keyword | Post title + content | Configurable debounce delay |
| Sort | WP_Query orderby | Relevance, date, title, price, or any meta_value |
| Conditional | Other filter state | Show/hide filter elements based on active filter values |
Djia Filters uses a pre-built flat index table to eliminate live taxonomy JOIN queries at filter time. The index auto-updates when posts are saved, updated or deleted.
- Built once β stored in a dedicated
djia_filter_indextable - Incremental updates β only changed posts are re-indexed on save
- Supports all public post types and all registered taxonomies + meta keys
- WP-CLI command for manual rebuilds and status checks
- Every unique filter state (URL params) is cached as a transient or object cache entry
- Shared anonymous cache β all visitors share the same cached response
- Configurable TTL from 5 minutes to permanent
- Compatible with Redis and Memcached via WordPress object cache
- AJAX requests bypass full-page cache (WP Rocket, LiteSpeed, Cloudflare)
Djia Filters integrates directly with WooCommerce product archives and custom product loops built with the Bricks Query Loop element.
| Setting | Default | Description |
|---|---|---|
| cache_ttl | 3600 | Seconds before a cache entry expires |
| cache_driver | transients | transients or object-cache |
| ajax_debounce | 300 | Milliseconds to wait after last interaction before firing AJAX |
| url_mode | pushState | pushState or replaceState for URL sync |
| index_batch | 200 | Posts per batch when rebuilding the index |
| count_display | true | Show result counts next to filter terms |