[Support request] Smooth Scroll not compatible with WP bakery Buttons

Home Forums Support [Support request] Smooth Scroll not compatible with WP bakery Buttons

Home Forums Support Smooth Scroll not compatible with WP bakery Buttons

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #2004794
    Krempel & Co. Werbeagentur

    Hello!

    i’m using GP Premium with WP Bakery Page Builder. I enabled smooth-scroll support in the customizer.

    When adding the smooth-scroll class to the button nothing happens, and the screen jumps to the anchor point. This is because WP-Bakery doesn’t add the class to the <a>-tag but the parent <div>.

    <div class="vc_btn3-container smooth-scroll vc_btn3-inline">
    <a style="background-color:#e80930; color:#ffffff;" class="vc_general vc_btn3 vc_btn3-size-md vc_btn3-shape-square vc_btn3-style-custom" href="#kontakt" title="Beratung vereinbaren">Beratung vereinbaren</a>
    </div>

    Now my question is if it is possible to make this compatible? Or – the better solution from my POV – to enable smooth scrolling for all anchor-links regardless of class. Is this possible? 🙂

    Regards,
    Maurice

    #2004838
    David
    Staff
    Customer Support

    Hi there,

    this article provides the PHP Snippet to enable smooth-scroll for all links:

    https://docs.generatepress.com/article/generate_smooth_scroll_elements/

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