Pagination breaks if there is only 1 page after filtering
-
Hi,
I have replicated the issue in a clean local test env.
Theme: Storefront
Plugins: WooCommerce, product filters (tried both ajax/no ajax pagination)Note: By default, Storefront shows pagination links both before and after the loop. Also, selectors are fine, the default values are correct. Counts are fine too.
Steps to replicate:
1. Add some test products
2. Make them span more than 1 page
3. Try any filter that results in products occupying only 1 page
4. Refresh your user agent
5. Clear/uncheck all filtersAt this point, top pagination disappears, and a (working) pagination element appears after the loop. Close inspection of said element reveals that it is outside the “storefront-sorting” wrapper.
Extra: The exact same thing happens, even if you unhook the bottom pagination with
remove_action('woocommerce_after_shop_loop', 'woocommerce_pagination', 30)
A pagination element appears outside the original DOM placement.
- The topic ‘Pagination breaks if there is only 1 page after filtering’ is closed to new replies.