Home Forums WoodMart support forum Remove Shop Pagenumber From URL

Remove Shop Pagenumber From URL

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #312089

    njbhatt18
    Participant

    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.

    #312103

    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

    #312151

    njbhatt18
    Participant

    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.

    #312165

    Artem Temos
    Keymaster

    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

    #312224

    njbhatt18
    Participant

    Hi there,

    It works. Thank you.

    #312226

    Artem Temos
    Keymaster

    Great, you are welcome! Feel free to contact us if you have any questions.

Viewing 6 posts - 1 through 6 (of 6 total)

The topic ‘Remove Shop Pagenumber From URL’ is closed to new replies.