• Resolved danwg

    (@danwg)


    Hi,

    I am using the “infinite scroll” option which works well but I have noticed that the main url get changed as soon we scroll down the page. For example “www.foo.com” turns to “www.foo.com/page/2/” etc. Is there any way to stop this behaviour and maintaing the url too “www.foo.com”?

    Thank you

    • This topic was modified 3 years, 10 months ago by danwg.
Viewing 2 replies - 1 through 2 (of 2 total)
  • Theme Author Anders Norén

    (@anlino)

    Hi @danwg,

    Not really, no. You would have to dequeue the Miyazaki JavaScript file in a child theme, and add a JavaScript file identical to the one in Miyazaki but with changes to the infinite scroll. That could cause conflicts with future updates to the theme, though, so I wouldn’t recommend it.

    You could also change the page URL to remove the /page/2/ after every infinite scroll (again, in child theme JavaScript).

    — Anders

    Thread Starter danwg

    (@danwg)

    ok thank you. I suggest you then to add the option for a “sticky” header / menu. It can easily be reached with something like:

    #site-header {
        position: fixed;
        top: 0;
        width: 100%;
        padding: 20px 0 20px 0;
    }
    
    #site-content {
        padding-top: 102px;
    }

    so in case of infinite scroll, wherever you are, you can just click on the logo to go back to the top.

    • This reply was modified 3 years, 10 months ago by danwg.
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Main url changes on infinite scroll’ is closed to new replies.