This document will help you with the mega menu for all the header builder menu component.
Till the last version of Astra & Astra Pro, megamenu only supports primary, secondary & menu-3 menus. As per the customer requirement to have mega menu support for multiple menus, we are providing here a filter provision. Users can place their menu name into this filter, and that menu will get mega menu support on the front end.
Have a glance at the attached filter for a better understanding.
Let’s say I want to have mega menu support for menu-3 & menu-4, so my updated filter will be –
add_filter( 'astra_nav_mega_menu_support', 'custom_megamenu_support', 10, 1 );
function custom_megamenu_support( $nav_menus ) {
$nav_menus[] = 'menu_3';
$nav_menus[] = 'menu_4';
return $nav_menus;
}