Archived topic
Prevent Smooth Scroll From Loading on Every Page
3 replies · Started by Christian on May 28, 2020
Hello, GP Team!
Quick question. Is there a way to make Smooth Scroll load only on the Blog Posts it's being used?
Currently, the Smooth Scroll JavaScript is loading on every page.
Thanks in advance!
Hi there,
You would have to manually dequeue and then re-enqueue the file where needed using conditionals.
It's a relatively small file with no dependencies, so not sure if it's worth it.
Happy to help with some example code if you need :)
Haha no, don’t worry. I was just curious.
Thanks, Tom!
No problem :)