Plugin Author
malihu
(@malihu)
Hello,
If “Prevent other scripts from handling plugin’s links” does not remove your theme’s functionality automatically, then you’ll have to do it manually (by editing some specific js script in your theme).
There’s no other way to deal with this as some theme’s have very aggressive functions that overwrite everything and no option to disable them.
I’d have to see your site in order to tell you which script needs to be modified (and what code to alter). If you can post your site’s URL I’d be happy to help.
Thread Starter
turnis
(@turnis)
My installation runs locally. So there’s no public appearance yet.
Nevertheless, I found the JavaScript file.
Plugin Author
malihu
(@malihu)
Try changing line 138 from:
$( '#site-navigation a[href*="#"]:not([href="#"]), .comments-link a[href*="#"]:not([href="#"]), .corp-scroll[href*="#"]:not([href="#"])' ).siteoriginCorpSmoothScroll();
to:
$( '#site-navigation a[href*="#"]:not([href="#"]):not(._mPS2id-h), .comments-link a[href*="#"]:not([href="#"]), .corp-scroll[href*="#"]:not([href="#"])' ).siteoriginCorpSmoothScroll();
Let me know if it works
Thread Starter
turnis
(@turnis)
Thanks for your help, but it’s unfortunately not working.
Plugin Author
malihu
(@malihu)
Try changing it to:
$( '.comments-link a[href*="#"]:not([href="#"]), .corp-scroll[href*="#"]:not([href="#"])' ).siteoriginCorpSmoothScroll();
and see if it works.
Thread Starter
turnis
(@turnis)
Unfortunately still not working. I uploaded all 8 JavaScript files for you. Maybe I missed something?
Plugin Author
malihu
(@malihu)
I just checked the js file and the changes are not there.
Line 138 in the file you send me, is still:
$( '#site-navigation a[href*="#"]:not([href="#"]), .comments-link a[href*="#"]:not([href="#"]), .corp-scroll[href*="#"]:not([href="#"])' ).siteoriginCorpSmoothScroll();
in other words, it wasn’t changed to the code I posted (in either of my posts).
Do you have a caching enabled? Can you make sure the changes in the file are saved and loaded on the frontend?
Thread Starter
turnis
(@turnis)
I’m using a child theme. I send you the files from the parent theme, so that you can have a look first hand.
No caching plugin installed. Cleared the cache anyway. Same outcome.
Plugin Author
malihu
(@malihu)
Can you make sure that the changes are loaded on the frontend via browser’s developer tools?
Thread Starter
turnis
(@turnis)
Unfortunately I don’t know how to this yet but if you send me a link to a tutorial I’ll figure it out.
Thread Starter
turnis
(@turnis)
The theme author just implemented a way to disable it’s own smooth scroll feature. Now your plugin works like charm! Thank you for your time!
Plugin Author
malihu
(@malihu)
Hey that’s great 🙂 Thanks for letting me know.
Marking this as resolved but if you need more help let me know.