A WordPress plugin providing a shortcode-based AJAX product filter for WooCommerce. Instantly filter products by category, color, price, and text search—without reloading the page.
- AJAX-powered: Instantly updates the product list without a page reload.
- Shortcode-based: Easily add the filter form anywhere using
[wei_ajax_search]
. - Multiple filter types: Filter by category, color attribute, price range, and text search.
- URL sync: Filter state is reflected in the URL and restored on reload.
- Theme-agnostic: Works with any WooCommerce-compatible theme.
- WordPress
- WooCommerce
- Upload the plugin to your
wp-content/plugins
directory. - Activate the plugin via the WordPress admin dashboard.
- Ensure WooCommerce is active.
-
Add the filter form to any page or post using the shortcode:
[wei_ajax_search]
-
The filter form will appear. The filtered product list will be updated in your theme's product container (e.g.,
.products
).Note: The plugin does not display products directly in the widget area; it updates the product list container outside the filter form.
- Registers the
[wei_ajax_search]
shortcode, which outputs a filter form with text, category, price, and color widgets. - Uses jQuery and AJAX to submit filter changes and update the product list dynamically.
- Filter state is synchronized with the URL for shareable/filterable links.
- Extensible via PHP classes in
src/Widgets/
for custom filter widgets.
wei-ajax-search.php
— Main plugin fileassets/js/filter.js
— AJAX and filter logicassets/css/style.css
— Styles for the filter formsrc/
— PHP source code (widgets, AJAX handler, assets registration)
- Author: Alexander Wei
- License: as-is