Disable scroll to ID
-
Hi there,
I’m using Corp in combination with Page scroll to id. It’s difficult to sync the scroll offset settings while Corp has it’s own configuration. Is it possible to disable the themes own “scroll to id” feature?
-
Hi @turnis
It would be quite complicated to remove the existing functionality. Is there something you can’t do with Corp? Corp can scroll to an ID, it’s detailed here:
https://siteorigin.com/corp-documentation/one-page-website/
Either using Page Builder row ID’s or using the ID
corp-scroll.Well, depends on if there’s a way to configure a manual scroll offset with Corp? I haven’t found a way…
There isn’t a way to configure offset. If you haven’t enabled the header resize on scroll setting then Corp should be perfectly positioning the header on the ID as seen here: https://demo.siteorigin.com/corp/one-page-demo/. A manually defined offset isn’t possible though.
To remove the Corp functionality you’d need to use a child theme, dequeue the current JS file, remove the smooth scroll section and then enqueue the edited/changed file in your child theme.
It’s “jquery.theme.js”, right? There are multiple appearances of smooth scroll. Which of them exactly do I have to exclude?
Can you perhaps share a link to the page concerned so we can see the challenge you’re working with? Solving that would be first prize.
If you carry out the customization I discussed above, it’ll mean that any changes we make to jquery.theme.js would need to be mirrored in your child theme file. It’s a big file that handles a wide range of functionality so it isn’t really ideal having it in the child theme. It’s doable, just not awesome.
My installation runs locally. So there’s no public appearance yet.
I see. This probably will become a problem in the future. I’ll ask the plugin author about a workaround. Nevertheless, thanks for your help!
Can you perhaps screenshot the situation for us? One screenshot of the front end situation, where the scroll needs to land etc. and another of the admin, where the ID is inserted.
The smooth scroll feature does work properly. It’s just that I think there should be a bigger top margin. No bug.
We can try to include a method that’ll allow you to add a function via Code Snippets plugin or your child theme to disable the theme’s smooth scroll functionality. To confirm, it’ll disable smooth scrolling. The hash offset plugin should hopefully work but the theme won’t smooth scroll to the anchor.
I’d like that. So I guess I just have to wait for a theme update?
For sure. I’ll have the update out this week and add the documentation how to disable smooth scroll.
Thanks! 🙂
The update is out. Docs have been updated here: https://siteorigin.com/corp-documentation/advanced-customizations/#heading-disable-smooth-scroll. Hope that helps.
I just tested it and it works very well! Thank you very much for taking care of this so fast!
Glad that helped.
All the best.
The topic ‘Disable scroll to ID’ is closed to new replies.
