Woo Archive Sort By Filter
This is the wooCommerce plugin for wordpress to sort by filter and total product count show
by Abed Hossain · github.com/devabedhossain/woo-archive-sort-by-filter---total-product-count
Install
No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:
wp plugin install https://github.com/devabedhossain/woo-archive-sort-by-filter---total-product-count/archive/refs/heads/main.zipAutomatic WooCommerce archive result count and catalog ordering for Elementor product grids.
Description
Woo Archive Sort By Filter automatically adds a result count and Sort by dropdown above WooCommerce product grids. It detects Elementor product Loop Grids and standard WooCommerce product grids without a shortcode, Query ID, widget ID, or CSS selector.
Features:
- Automatic result-count and sorting-toolbar placement.
- Native Elementor widget for placing the controls anywhere in a Product Archive template.
- Backend switches for showing or hiding the result count and dropdown.
- Backend checkboxes for every Sort by dropdown option.
- Default, popularity, average-rating, latest, A–Z, Z–A, low-price, and high-price sorting.
- WooCommerce product lookup-table ordering for price, popularity, and rating.
- AJAX grid updates with a full-page fallback.
- AJAX pagination support for Elementor Loop Grids.
- Shop, product category, product tag, product taxonomy, and product-search support.
- No custom database tables and no jQuery requirement.
Installation
- Upload
woo-archive-sortby-filter-1.4.0.zipthrough Plugins > Add New > Upload Plugin. - Activate Woo Archive Sort By Filter.
- Remove the old result-count and ordering Shortcode widgets from the Elementor Product Archive template.
- Clear Elementor, page, server, and CDN caches.
The plugin detects the product grid and places the enabled controls directly above it.
Settings
Open WooCommerce > Archive Sort Filter.
- Archive controls: show or hide the result count and Sort by dropdown.
- Sort by options: choose which ordering choices appear in the dropdown.
- AJAX updates: disable this to use normal full-page sorting.
At least one sorting option is always retained so the dropdown cannot become empty.
Elementor widget
Search the Elementor panel for Woo Archive Sort By Filter and drag the widget anywhere in the WooCommerce Product Archive template.
The widget can show:
- Result count and Sort by dropdown together.
- Result count only.
- Sort by dropdown only.
- Horizontal or vertical layout.
When this Elementor widget is present, the automatically positioned toolbar is disabled to prevent duplicate controls. Dropdown choices still come from WooCommerce > Archive Sort Filter.
How it works
The plugin detects WooCommerce product queries on archive requests and applies the selected order at the final WordPress query stage so Elementor widget settings cannot replace it.
Price, popularity, and average-rating sorting use WooCommerce's product lookup table. Latest and alphabetical sorting use WordPress query ordering with a product-ID tie-breaker.
On the front end, the plugin uses existing WooCommerce archive controls when the template already contains them. Otherwise it creates the enabled controls and places them above the detected product grid. AJAX replaces the product grid while preserving active shop filters and updating the browser URL.
Troubleshooting
Old shortcode text appears
Remove the old Shortcode widgets from the Elementor Product Archive template. They are no longer needed.
The controls do not appear
Open WooCommerce > Archive Sort Filter and confirm the controls are enabled. Then clear Elementor, page, server, and CDN caches.
The dropdown changes but products keep the old order
Clear all caches and confirm the Elementor Loop Grid displays WooCommerce products on a product archive template.
The result range is incorrect
Keep the Elementor Loop Grid products-per-page value aligned with the WooCommerce archive products-per-page value.
Changelog
1.4.0
- Added a native Woo Archive Sort By Filter Elementor widget.
- Added widget switches for the result count and Sort by dropdown.
- Added horizontal and vertical widget layouts.
- Prevented duplicate automatic controls when the Elementor widget is used.
- Added a version number to the downloadable ZIP filename.
1.3.0
- Removed the need for shortcodes, Elementor Query IDs, widget IDs, and CSS selectors.
- Added automatic result-count and sorting-toolbar placement above product grids.
- Added backend switches for the result count and Sort by dropdown.
- Added backend checkboxes for choosing every visible sorting option.
- Added support for existing WooCommerce archive controls without duplicate output.
- Kept price, average-rating, latest, popularity, alphabetical, and default sorting tied to the final product query.
1.2.0
- Removed all site-specific names, identifiers, selectors, and defaults.
- Added automatic Elementor product-query detection.
- Fixed low-price, high-price, popularity, average-rating, and latest sorting.
1.1.0
- Changed the plugin author to Abed Hossain.
- Added product-name sorting from A to Z and Z to A.
1.0.1
- Renamed the plugin to Woo Archive Sort By Filter.
- Removed the WordPress plugin-dependency declaration.
1.0.0
- Initial release.