Divi
Header Menu Option 1: Use the Divi Header Builder
Divi 4 has been released and includes a new header builder, which gives you more flexibility on how your header is laid out and makes it a lot easier to integrate Max Mega Menu.
Divi 4 Header Builder instructions
Header Menu Option 2: Use the default Divi Header
Before you start
We have many users who use Max Mega Menu with Divi with no issues at all, however some users find it more difficult to integrate with than we would like. The Divi Menu has many more options than most themes, each tightly integrated with other areas of the theme. This makes it a lot more difficult to integrate Max Mega Menu with Divi than it is with other themes.
Due to the way Divi is coded both the desktop and mobile menu will be replaced with Max Mega Menu.
If you are planning on purchasing the Pro addon, we request you try the free version of Max Mega Menu (and make sure you are happy with it) before upgrading to Pro. The Pro addon will not change the base functionality of Max Mega Menu.
If you just want to create mega sub menus using Divi then we recommend using functionality built into Divi.
Fix Mobile Menu
The Divi mobile menu is coupled with the Divi desktop menu, therefore it is not possible to keep the Divi Mobile Menu if the desktop menu is replaced with Max Mega Menu.
The following CSS will hide the native Divi Mobile Menu and properly display the Max Mega Menu mobile menu.
From your WordPress Dashboard, go to Mega Menu > Menu Themes > Custom Styling and paste in the following.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
@media only screen and (max-width: 980px) { header .et_pb_fullwidth_menu .fullwidth-menu-nav, header nav#top-menu-nav { display: block !important; } } @media only screen and (max-width: 767px) { header nav#top-menu-nav, header #et-top-navigation { width: 100%; } } header #et_mobile_nav_menu, header .et_mobile_nav_menu { display: none !important; } /* stop menu from overlapping logo on mobile */ @media all and (max-width: $responsive_breakpoint) { header .logo_container { position: relative !important; padding-top: 15px; } header div#et-top-navigation { padding-left: 0 !important } } |
If you do not like the Max Mega Menu mobile menu, you can try using a different plugin for the mobile menu.
Full Width Sub Menus
To make the mega menu drop downs span the entire width of the page (rather than just the width of the menu), go to Mega Menu > Menu Themes > Mega Menu and set the following values:
Panel Width (Outer):
1 |
body |
Panel Width (Inner):
1 |
.container |
Sub Menu Animations
Depending on how Divi is set up it will override the mega menu dropdown effect.
Go to Appearance > Customize > Header & Navigation > Primary Menu Bar. Set “DROPDOWN MENU ANIMATION” to “Fade”. This should stop divi from overriding the mega menu effect.
Full Width Menu
To make the primary menu full width (so that it sits underneath the logo), go to Appearance > Customize > Additional CSS and insert the following:
1 2 3 4 5 6 7 8 9 10 11 |
.logo_container { position: relative !important; padding-top: 15px; } div#et-top-navigation { padding-left: 0 !important; float: none !important; } nav#top-menu-nav { float: none !important; } |
Full Width Mobile Menu
From your WordPress Dashboard, go to Appearance > Customize > Additional CSS and insert the following:
1 2 3 4 5 |
@media screen and (max-width: 782px) { header .container { width: 100%; } } |
Display Secondary Menu on Mobiles
The secondary menu is hidden by default on mobiles. To make it display again, go to Appearance > Customize > Additional CSS and insert the following:
1 2 3 4 5 |
#top-header #et-secondary-nav, #top-header #et-secondary-menu, #top-header { display: inline-block !important; } |
Hide Theme Logo on Mobile
If you want to display your logo as a mobile toggle block rather than using the standard theme logo, go to Mega Menu > Menu Themes > Custom Styling and insert the following:
1 2 3 4 5 |
@include mobile { .logo_container { display: none; } } |
Fix “Full Width Menu” module
When using the full width menu module in Divi the Primary Menu will always be displayed regardless of the menu selected in the module settings. To fix this add the following to the bottom of your themes functions.php file:
1 2 3 4 5 6 7 8 9 |
function remove_theme_location($args) { if ( isset( $args['theme_location'] ) ) { unset( $args['theme_location'] ); } return $args; } add_filter('et_fullwidth_menu_args', 'remove_theme_location'); add_filter('et_menu_args', 'remove_theme_location'); |
Note: Do not use the Menu / Full Width Menu module if you are attempting to display a Max Mega Menu menu within your page content. Instead, add a Code module to your page and use a shortcode to display the menu.