Remove Shop Pagenumber From URL
-
Hi,
We are using the Infinite Loading/Load More feature of theme, so when more products loads on scroll and it adds the page number in URL. We want to get rid of that because whenever user go back in history, it will only show the products of that page number.
For example, if you go to Homepage and then load next page products (ex: page no. 2), after that go to any single product page, so when you go back from product page, it will redirect you to last page (page no.2). We don’t want to do that instead if user go back in history they will redirect to Homepage without applying any pagination.
Is that possible? Is there any workaround for that? Please advice.
Hello,
Thank you very much for choosing our theme and for contacting us.
Please try to set the whole number of products you have in store, for example, 1000 in “Products per page” you can find this option in the Theme Settings > Shop > Product Archive.
Best Regards
Hi Elise,
Thank you for responding so quickly and for your suggestion.
We don’t want to display all products on one page, we need the pagination. We just want to remove page number from URL so user quickly redirect back to first page instead of last page number.
Is there any PHP/JS code to resolve this? Please advice.
Hello,
Try to add the following PHP code snippet to the child theme functions.php file to disable this
add_filter( 'woodmart_load_more_button_page_url', '__return_false' );
Kind Regards
Hi there,
It works. Thank you.
Great, you are welcome! Feel free to contact us if you have any questions.
The topic ‘Remove Shop Pagenumber From URL’ is closed to new replies.