Home Forums WoodMart support forum How to remove "offset" when setting-up a Menu with "one page anchor"

How to remove "offset" when setting-up a Menu with "one page anchor"

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #322764

    Jeriss Cloud Center
    Participant

    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

    #322789

    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

    #322794

    Jeriss Cloud Center
    Participant

    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” ?

    #322822

    Hello,

    Please provide your site admin access.

    Best Regards

    #322914

    Jeriss Cloud Center
    Participant

    See below

    #323042

    Hello,

    I am checking and I cannot reproduce the problem:

    https://gyazo.com/d288f6a5baa48fd86df8d0b1bd2369cf

    and

    https://gyazo.com/2e5b2a2246c5f893666d2a5e955efa0c

    and

    https://gyazo.com/34f9ae9941f4e4d445d5cadea92262a0

    What browser and what width are you testing at?

    Best Regards

    #323940

    Jeriss Cloud Center
    Participant

    Please test again, the issue is still present.

    #324298

    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

    #324603

    Jeriss Cloud Center
    Participant

    Code works perfectly, thanks !

    You can close this ticket

Viewing 9 posts - 1 through 9 (of 9 total)

The topic ‘How to remove "offset" when setting-up a Menu with "one page anchor"’ is closed to new replies.