WooCommerce integration
Overview
WPEnhanced Ajax Filter Blocks integrates with WooCommerce through the same three Gutenberg blocks used for posts. Point an Archive Loop at the Product post type, then add Filter Posts Item blocks for WooCommerce-specific sources.
No separate WooCommerce extension is required beyond having WooCommerce installed and active.
Supported product filters
| Filter source | Use for |
|---|---|
| Product category | Shop by category (product_cat) |
| Product tag | Marketing tags (product_tag) |
| Product attribute | Color, size, material, and custom attributes |
| Price | Min/max range slider or inputs |
| Stock status | In stock, out of stock, on backorder |
| Weight | Shipping weight ranges (when relevant) |
| Search | Keyword search within the product loop |
Configure each source in a Filter Posts Item block inside Filter Posts.
Basic WooCommerce setup
-
Archive Loop
- Post type: Product
- Pagination, grid columns, and template as needed
- Optional: hide out-of-stock products in loop query settings
-
Filter Posts
- Linked to the product Archive Loop on the same page
- URL sync enabled if you want shareable shop URLs
-
Filter Posts Item blocks
- One item per facet (category, attribute, price, etc.)
See Filter products by category for a full walkthrough.
Product attributes and swatches
WooCommerce global attributes (e.g. pa_color) appear as filter sources when you choose Product attribute in a filter item.
For visual attribute selection:
- Set control type to Radio or Checkbox
- Enable Swatches in the filter item design settings
- Map colors or images to attribute terms
See Filter swatches for swatch configuration.
Price, sale, and variable products
- Simple products: Price filter uses the displayed price.
- Sale products: Effective sale price is typically used for range matching—verify on staging.
- Variable products: Price may span a min–max across variations; test your catalog's most common variable products.
Stock and catalog visibility
Use Stock status filters to let customers show only in-stock items. Align Archive Loop query settings with filter behavior so out-of-stock products are hidden consistently in both the initial load and AJAX responses.
WooCommerce templates and block themes
WPEnhanced Ajax Filter Blocks works in the block editor on pages and templates. You can:
- Build a custom Shop page and point WooCommerce Shop page setting to it
- Use Site Editor templates with Archive Loop + Filter Posts for archive-style layouts
Ensure only one primary product loop on a page targets the same filter group unless you intentionally configure multiple independent pairs.
Performance on large catalogs
Stores with thousands of SKUs may see slower option counts on taxonomy filters. WPEnhanced Ajax Filter Blocks Pro includes Catalog Index for faster counts—see Catalog Index.
What's next
- Filter products by price range — Price slider tutorial
- Filter swatches — Attribute swatches
- Catalog Index (Pro) — Faster counts on large catalogs