Display SubMenu Just Below the Header

No results found. Try again with different words?

Search must be at least 3 characters.

    Display SubMenu Just Below the Header

    If you have observed, whenever you hover the parent menu, the submenu opens just below the parent menu. No matter what your header height is. In this case, submenu cuts the header and display over it just below the parent menu.

    In the Astra Theme version 1.5.0 and above we are introducing a filter that will open a submenu below the header without cropping it. You can enable this functionality by adding the following filter to the child theme’s function.php file.

    add_action( 'wp', 'astra_open_submenu_below_header' );
    function astra_open_submenu_below_header() {
      if ( false === astra_get_option( 'submenu-below-header', true ) ) {
        add_filter( 'astra_submenu_below_header_fix', '__return_true' );
      }
      add_filter( 'astra_submenu_open_below_header_fix', '__return_true' );
    } 

    This filter introduces padding difference of ~5px in the header.

    How this will work for existing sites –

    For the existing sites, those will update to this version (1.5.0) the above change will be disabled by default. You can enable this by adding the above filter.

    How this will work for new installations –

    If you freshly installed Astra Theme with version 1.5.0 and above the above functionality will be enabled by default. You don’t need to add any snippet.

    The functionality of the filter is shown below:

    Before adding a filter:

    After adding a filter:

    Was this article helpful?
    Did not find a solution? We are here to help you succeed.

    Related Docs

    111063

    Biggest Ever Cyber Monday Sale!

    00
    Months
    00
    Days
    00
    Hours
    00
    Minutes
    00
    Seconds
    111064

    Don't Miss Our Biggest Discount

    ***LIMITED TIME ONLY***

    100% Unconditional Money-back Guarantee

    Purchase today & lock in your deal!

    Scroll to Top
    Now choose your preferred
    page builder addon
    Choose your preferred page builder addon

    Download is Just A Click Away!

    Be among the first to try the beta version of Astra’s Header Footer Builder. Filling the form will ensure you’ll be the first to learn about updates and features.

    Download is Just A Click Away!

    Enter your email address and be the first to learn about updates and new features.