Site logo

Archived topic

Inrease Margin/Offset Smooth Scrolling with Ubermenu sticky activated

3 replies · Started by finanzbeben on October 18, 2022

Viewing posts 1–4 of 4

Hi there,

Currently, I'm struggling with using GP in combination with UberMenu. First of all, to use UberMenu, I deactivated the standard GP Menu.
Using the standard GP menu, smooth-scrolling would find its way to the correct setting of the anchor when sticky menu is activated. However, this seems not to work anymore after deactivation of the standard GP menu. Is there another possibility to use the GP smooth-scroll function and adjust the margin/offset for the fixed/sticky UberMenu manually with Code Snippets?

I have found the following topic, but this doesn't do the job for my problem.

https://generatepress.com/forums/topic/how-to-increase-margin-of-smooth-scroll-sections/

Kind regards and many thanks

Hi there,

the GP Smooth Scroll uses Javascript to calculate the height of the GP Sticky Nav to form its offset. And that is baked into the Javascript, so no filter available for that.

Our script is built from this, so you could use that to implement your own solution:

https://github.com/cferdinandi/smooth-scroll

Hi David, thanks for your input.

I found myself an easy solution: Using the following plugin: "Page scroll to id" and simply deactivation of smooth-scroll from GP

Glad to hear that :)

This archived topic is closed to new replies.