Are you a GenerateCustomer?

Do you have an active GP Premium or GenerateBlocks Pro license key?

Create a GenerateSupport account for GeneratePress and GenerateBlocks support in one dedicated place.

Create an account
Already have a GenerateSupport account? Login

Just browsing?

Feel free to browse the forums. Support for our free versions is provided on (GeneratePress, GenerateBlocks).

Want to become a premium user? Learn more below.

Smooth-scroll not working

  • Hi!
    With the new release of GB and GP I can’t get the smooth-scroll to work. Is there something I am missing here? Look at the page in the private info and the section “Snabblänkar”. Thanks!


  • Hi there,

    The smooth-scroll class needs to be added to the a element, you are currently adding it to the text span.

    Try to use this PHP to make all anchor links smooth scroll. You can remove the smooth scroll class from the headline block 🙂

    add_filter( 'generate_smooth_scroll_elements', function( $elements ) {
        $elements[] = 'a:not([data-gpmodal-trigger="gp-search"])[href*="#"]';
        return $elements;
    } );
  • Works great! Thanks!

  • You are welcome   🙂

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.