Hello again,
I checked your page. The issue you’re having on mobile comes from the mobile-menu plugin (not the theme itself).
The mobile-menu plugin has its own function for scrolling the page and this prevents “Page scroll to id” from doing its thing (like scrolling the page, applying the offset etc.)
The mobile-menu script that does this is:
...wp-content/plugins/mobile-menu/includes/js/mobmenu.js
The code in the js script above is written is such way that it cannot be “corrected” via the “Prevent other scripts…” option.
There are 2 ways to fix this. The 1st way is an actual solution. The 2nd way is more of a hack. I’ll post both ways so choose the one you want ??
Solution 1
This is an actual solution as it’ll allow you to use “Page scroll to id” with all its functions on the mobile menu (i.e. the same way it works on the desktop menu).
Edit the ...wp-content/plugins/mobile-menu/includes/js/mobmenu.js
script.
Find the line 165:
.not('[href="#0"]')
Enter a new line below it and copy/paste this:
.not('._mPS2id-h')
Save the file and test your page.
Solution 2
This is more of a hack in the sense that it’ll allow you to offset mobile scrolling via CSS but you’ll still use the mobile-menu function to scroll the page (i.e. some “Page scroll to id” options like offset won’t apply or have any effect on mobile).
You’ll need to add the following CSS rule to your target sections:
@media (max-width: 991px){
#about, #formules, #equipe, #planning, #contact{
padding-top: 95px !important;
margin-top: -95px !important;
}
}
The !important
part might not be needed depending on the other CSS rules, so check it and remove it if it works well without it.
Save the styles and test your page.
That’s it.
The culprit on the 1st solution is that you’ll need to re-edit the mobmenu.js
if/when you update the mobile-menu plugin to a new version.
Let me know if it worked and which solution you applied ??