How to remove "offset" when setting-up a Menu with "one page anchor"
-
Dear,
Please check the link in private. I added a “one page anchor” in the mobile menu. However, I noticed it’s adding by default an offset, which I don’t want.
How to remove this offset?
Thanks
Hello,
You would better assign ID to each section, then insert a custom link with this ID and when you click the Service menu item you will be moved exactly to the Service section.
If you have any questions please feel free to contact us.
Best Regards
Dear,
This is exactly what I did. On home page :
1) created rows, and assigned an ID to each row => “accueil” / “services” / “contact” …
2) created a menu link for each row => with the ID above
However, I need the “One Page Anchor” feature enabled to have the smooth effect. I just disabled this “One Page Anchor” and the offset disappears, but then the “smooth scroll” has disappeared too. Why is there an offset when I use the “One Page Anchor” ?
Hello,
Please provide your site admin access.
Best Regards
Please test again, the issue is still present.
Hello,
Please add this code to the functions.php of the child theme.
add_filter(
'woodmart_one_page_menu_offset',
function() {
return 0;
}
);
Best Regards
Code works perfectly, thanks !
You can close this ticket
The topic ‘How to remove "offset" when setting-up a Menu with "one page anchor"’ is closed to new replies.