Archived topic
Links with anchors are overridden by back-to-top behavior
3 replies · Started by Scott on January 26, 2023
Hi all. I'm trying to use a pagination link like this: https://sitename.com/slug/?page=2#anchorname
When I use that URL in a link created by the gutenberg editor, it works briefly...the new page is displayed, positioned down to the bottom where the anchor is...but then it immediately jumps back to the top as if a scroll-to-top button was clicked.
I've tried this with the Customize > Layout > Footer > Back to Top Button option both enabled and disabled, and it behaves the same both ways.
How can I keep the new page displayed at the anchor without scrolling back up?
Hi there
can you share a link to where i can see this ?
Hi Scott,
It doesn't look like a GP issue to me, can you try the NO. 1 tip here:
https://docs.generatepress.com/article/debugging-tips/
If you have any JavaScript inserted using GP hook elements, please try disabling them as well.
Let me know!