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: