Loading experience
Docs/Djia Filters
Djia Filters Module

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.

15 filter elements
9 filter types
Any CPT + WooCommerce
⚑
Overview

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.

πŸ“Œ
Djia Filters works with any registered public post type. WooCommerce-specific filter types (price, stock, attribute) require WooCommerce to be active.
πŸ”§
Filter Container Setup

The Filter Container element is the parent wrapper for all filter elements. It connects to your Query Loop via a CSS selector.

1

Add a Filter Container

Drag the Filter Container element anywhere on your page β€” above, beside or below your listing.

2

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.

3

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.

4

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.

WP-CLI
# Build index for products wp djia index rebuild --post-type=product # Build for a custom post type wp djia index rebuild --post-type=listing # Check index status wp djia index status # Flush cache wp djia cache flush
🧩
Filter Elements Reference

All 15 filter elements are available in the Bricks element panel under the Djia Filters category.

ElementDescriptionFilter Types
CheckboxesMulti-select filter with result counts per termTaxonomy, Meta
RadioSingle-select filter for taxonomy and meta facetsTaxonomy, Meta
SelectDropdown with optional multi-select modeTaxonomy, WooCommerce
Color SwatchVisual color circles per term β€” circle or square shapeTaxonomy, Woo attribute
Image SwatchImage per term for fabric, texture or pattern filteringTaxonomy, Woo attribute
Range SliderSingle dual-handle slider for numeric or price rangeMeta, Woo price
Min / Max InputTwo number inputs for precise range entryMeta, Woo price
Toggle ButtonButton group for single or multi-selectTaxonomy, Meta
SearchKeyword search on post title and contentKeyword
Sort / OrderOrder-by dropdown β€” date, title, price, custom metaSort
Active TagsDisplays active filters with individual clear buttonsAll
Reset / Clear AllClears all active filters in the containerAll
Apply ButtonManual mode β€” results refresh only on clickManual mode
Offcanvas PanelMobile slide-out filter drawerContainer
Filter GroupCollapsible wrapper for grouping related filtersContainer
πŸ”€
Filter Types
TypeSourceNotes
TaxonomyAny registered taxonomyAND/OR relation, hide empty, count display
Post MetaAny post meta keyString, numeric or date comparison. ACF, Meta Box, Pods compatible
Woo AttributeWooCommerce attribute (pa_color…)Variation-aware stock counting
Woo Price_price metaAuto min/max boundary detection from indexed data
Woo Stockstock_statusIn stock, out of stock, on backorder
Woo Rating_wc_average_ratingMinimum star rating filter
KeywordPost title + contentConfigurable debounce delay
SortWP_Query orderbyRelevance, date, title, price, or any meta_value
ConditionalOther filter stateShow/hide filter elements based on active filter values
⚑
Index & Cache

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.

Index
  • Built once β€” stored in a dedicated djia_filter_index table
  • 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
Cache
  • 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)
βœ…
For stores with 10,000+ products, set cache TTL to 3600s+ and enable object cache (Redis). Repeat filter states will serve in 0ms from cache.
πŸ›’
WooCommerce Filtering

Djia Filters integrates directly with WooCommerce product archives and custom product loops built with the Bricks Query Loop element.

ℹ️
For WooCommerce price filtering on sites with thousands of products, always build the index first. Raw meta queries on large product tables can be slow without indexing.
βš™οΈ
Settings Reference
SettingDefaultDescription
cache_ttl3600Seconds before a cache entry expires
cache_drivertransientstransients or object-cache
ajax_debounce300Milliseconds to wait after last interaction before firing AJAX
url_modepushStatepushState or replaceState for URL sync
index_batch200Posts per batch when rebuilding the index
count_displaytrueShow result counts next to filter terms