1. PROMO Subscribe our All Access Pass @ 75% OFF & access all our 16+ premium Divi extensions: Divi Block Pro, Carousel Toolkit, etc.LEARN MORE
Dismiss Notice
NEW Divi.Help Pro Carousel AI Toolkit - Magically turn your Divi design into carousel, simply by using our online toolkit. No plugins needed. Now it works with Divi 5 as well!Try our carousel AI toolkit
BEST Divi Block - A revolutionary drag & drop tool to easily mix & match 960+ premade blocks (Light & Dark) to kick start your Divi site design. Special module designs are included as well. Also newly added AI generator & color. Now it works with Divi 5 as well!
Learn More About Divi BlockFree Version ~ 340+ Free Blocks

The problem with anchors on the site is due to the header plugin.

Discussion in 'Basic Support Forum' started by weelp, Jan 20, 2021.

  1. weelp

    weelp New Member
    Divi Ultimate Header Plugin

    Hello. The problem with anchors on the site is due to the header plugin.
    We wrote to the developers of the divi, that's what they answered.
    Hi Evgeny! [​IMG]

    Faisal here from the senior support team.

    Issue is actually caused by a 3rd party plugin named "Divi Ultimate Header Plugin". You can contact their support/author later.

    For the time being I have fixed the issue using this JS code that is added in:
    Theme Options -> Integration -> "Head"

    <script>
    jQuery(function($) {
    setTimeout(function() {
    var windowsize =$(window).width();
    //if (windowsize >= 980) {
    window.et_pb_smooth_scroll = function( $target, $top_section, speed, easing ) {
    var $window_width = $( window ).width();
    $menu_offset = -1;
    var headerHeight = 150;
    if ( $ ('#wpadminbar').length ) {
    $menu_offset += $( '#wpadminbar' ).outerHeight() + headerHeight;
    } else {
    $menu_offset += headerHeight;
    }
    //fix sidenav scroll to top
    if ( $top_section ) {
    $scroll_position = 0;
    } else {
    $scroll_position = $target.offset().top - $menu_offset;
    }
    // set swing (animate's scrollTop default) as default value
    if( typeof easing === 'undefined' ){
    easing = 'swing';
    }
    $( 'html, body' ).animate( { scrollTop : $scroll_position }, speed, easing );
    }
    //}
    }, 100);
    });
    </script>
    There is a value like 150 in this part of the code:

    var headerHeight = 150;
    Change its value a bit to your liking according to the height of the sticky (fixed) navigation bar.

    And let me know if it works for you. [​IMG]
     

    Attached Files:

    1. PRO MEMBER PERKS Divi Block Pro - Premade card carousel design for your Divi site without using any plugins:View Demo