Hello,
The issue you’re having happens because another script handles the link’s smooth scrolling. This script prevents “Page scroll to id” from doing its thing. That’s why changing plugin settings doesn’t seem to have an effect.
I don’t know if the script that does this comes from your theme or another plugin cause all scripts are bundled in one js file.
The script that currently handles your links and prevents “Page scroll to id” from scrolling the page is this:
...themes/Divi/js/custom.unified.js
I saw that you correctly enabled “Prevent other scripts from handling plugin’s links” option but it won’ always work.
So, there are 2 ways to solve this, so choose the one that works:
1)Manually edit custom.unified.js
(e.g. in the theme editor). In the script find the text:
a[href*="#"]:not([href="#"]), .mobile_nav
and replace it with:
a[href*="#"]:not([href="#"]):not(.__mPS2id), .mobile_nav
Replace it exactly as above and don’t change anything else in the rest of the code.
Save the file and test your page.
2)Edit your theme/child-theme footer.php
template and add the following script above the closing body tag (</body>
) and below wp_footer()
function:
<script>
(function($){
$(window).on("load",function(){
$("#sticky a.__mPS2id[href*='#']:not([href='#'])").off("click");
});
})(jQuery);
</script>
Save and test.
Let me know ??