-
Botrytis
Hello,
My anchors don’t work properly with classic buttons in my pages.
When I click on the back-to-top button, the page rises very slowly and is difficult to access.
No problem if the internal anchor is in a navigation menu (but difficult to modify in css).
I tried deactivating the smooth-scroll class in the theme customisation, but it didn’t work.
Do you have a solution?
Thanks -
Hi there,
It’s because you have this CSS is which interfering with the script of the back to top’s smooth scroll.
html { scroll-behavior: smooth; }
Try this PHP snippet to remove smooth scroll from the back to top button://remove GP smooth scroll from back to top button:
add_filter( 'generate_back_to_top_js_args', function( $args ) { $args['smooth'] = false; return $args; } );
Adding PHP: https://docs.generatepress.com/article/adding-php/
-
Botrytis
It’s perfect.
Thank you for your support, which is always responsive and provides the right solution! 😉 -
You are welcome 🙂
- You must be logged in to reply to this topic.