PluginUs.Net - Business Tools for WooCommerce and WordPress

[realize your idea - make your dreams come true]

Support Forum

You need to log-in to create request (topic) to the support

Remove page number when the product filter is changed

The support doesn work on Saturdays and Sundays, so some Friday requests can be answered on Monday. If you have problems with registration ask help on contact us page please
If you not got email within 24~36 business hours, firstly check your spam box, and if no any email from the support there - back to the forum and read answer here. DO NOT ANSWER ON EMAILS [noreply@pluginus.net] FROM THE FORUM!! Emails are just for your info, all answers should be published only here.
The support doesn work on Saturdays and Sundays, so some Friday requests can be answered on Monday.

On our website we sometimes get a 404 error when the product category is changed if the page number is higher than the products in the category.

Here is an example - Use the link below and then untick 'Blank Cards' you will get a 404 error.

https://hannahlongmuir.co.uk/shop/page/3?swoof=1&product_cat=kraftcards%2Ckraftcards%2Cblank-cards

Is there a way to remove the page number in the URL when the product filters are changed?

 

I am using the Premium version of the plugin.

Many thanks, Martyn

Hello Martyn

Try  in  file - \wp-content\plugins\woocommerce-products-filter\js\front.js - change  code - https://c2n.me/48h77rX.png

link = link.replace(new RegExp(/page\/(\d+)/),"");

Thanks for your help. I have updated the line of code in '\wp-content\plugins\woocommerce-products-filter\js\front.js' and cleared out the cache but still makes no difference.

In the private data I have added my admin login if you ant to take a closer look.

front.js updated code

I have fixed the problem. The website was still using cache data. I changed the file name in '/wp-content/plugins/woocommerce-products-filter/index.php' and updated the new file name in 'js' folder.

Here is the code I changed. I just modified the file name.

wp_enqueue_script('woof_front', WOOF_LINK . 'js/front-mod.js', array('jquery'), WOOF_VERSION);

Thanks again for your help.

 

Hello

Ok!  Great!