{"id":217607,"date":"2019-10-18T11:48:34","date_gmt":"2019-10-18T10:48:34","guid":{"rendered":"https:\/\/www.megamenu.com\/documentation\/divi-copy\/"},"modified":"2019-12-19T10:55:05","modified_gmt":"2019-12-19T10:55:05","slug":"divi-4","status":"publish","type":"ht_kb","link":"https:\/\/www.megamenu.com\/documentation\/divi-4\/","title":{"rendered":"Divi 4"},"content":{"rendered":"<p>Divi 4 includes a new header builder. The addition of the header builder allows us to perfectly integrate Max Mega Menu with Divi without the need for custom code or a child theme.<\/p>\n<h3>Step 1 &#8211; Create the menu<\/h3>\n<p>This step is the same for all themes. First we need to create a new menu, tag it the Primary Menu location and enable Max Mega Menu.<\/p>\n<p><a href=\"https:\/\/www.megamenu.com\/wp-content\/uploads\/2019\/10\/divi-menu-location.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-217610\" src=\"https:\/\/www.megamenu.com\/wp-content\/uploads\/2019\/10\/divi-menu-location.png\" alt=\"\" width=\"2646\" height=\"1692\" srcset=\"https:\/\/www.megamenu.com\/wp-content\/uploads\/2019\/10\/divi-menu-location.png 2646w, https:\/\/www.megamenu.com\/wp-content\/uploads\/2019\/10\/divi-menu-location-300x192.png 300w, https:\/\/www.megamenu.com\/wp-content\/uploads\/2019\/10\/divi-menu-location-768x491.png 768w, https:\/\/www.megamenu.com\/wp-content\/uploads\/2019\/10\/divi-menu-location-1024x655.png 1024w, https:\/\/www.megamenu.com\/wp-content\/uploads\/2019\/10\/divi-menu-location-50x32.png 50w\" sizes=\"auto, (max-width: 2646px) 100vw, 2646px\" \/><\/a><\/p>\n<h3>Step 2: Output the menu using the Divi Theme Builder<\/h3>\n<p>Go to <em>Divi &gt; Theme Builder<\/em> and click &#8220;Add Global Header&#8221;. In the small popup that appears, click &#8220;Build Global Header&#8221;. On the next screen, click &#8220;Build From Scratch&#8221;.<\/p>\n<p><a href=\"https:\/\/www.megamenu.com\/wp-content\/uploads\/2019\/10\/divi-add-global-header.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-217611\" src=\"https:\/\/www.megamenu.com\/wp-content\/uploads\/2019\/10\/divi-add-global-header.png\" alt=\"\" width=\"2646\" height=\"1692\" srcset=\"https:\/\/www.megamenu.com\/wp-content\/uploads\/2019\/10\/divi-add-global-header.png 2646w, https:\/\/www.megamenu.com\/wp-content\/uploads\/2019\/10\/divi-add-global-header-300x192.png 300w, https:\/\/www.megamenu.com\/wp-content\/uploads\/2019\/10\/divi-add-global-header-768x491.png 768w, https:\/\/www.megamenu.com\/wp-content\/uploads\/2019\/10\/divi-add-global-header-1024x655.png 1024w, https:\/\/www.megamenu.com\/wp-content\/uploads\/2019\/10\/divi-add-global-header-50x32.png 50w\" sizes=\"auto, (max-width: 2646px) 100vw, 2646px\" \/><\/a><\/p>\n<p>Create a new full width row:<\/p>\n<p><a href=\"https:\/\/www.megamenu.com\/wp-content\/uploads\/2019\/10\/divi-header-row.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-217612\" src=\"https:\/\/www.megamenu.com\/wp-content\/uploads\/2019\/10\/divi-header-row.png\" alt=\"\" width=\"2646\" height=\"1692\" srcset=\"https:\/\/www.megamenu.com\/wp-content\/uploads\/2019\/10\/divi-header-row.png 2646w, https:\/\/www.megamenu.com\/wp-content\/uploads\/2019\/10\/divi-header-row-300x192.png 300w, https:\/\/www.megamenu.com\/wp-content\/uploads\/2019\/10\/divi-header-row-768x491.png 768w, https:\/\/www.megamenu.com\/wp-content\/uploads\/2019\/10\/divi-header-row-1024x655.png 1024w, https:\/\/www.megamenu.com\/wp-content\/uploads\/2019\/10\/divi-header-row-50x32.png 50w\" sizes=\"auto, (max-width: 2646px) 100vw, 2646px\" \/><\/a><\/p>\n<p>Add a new <strong>Code<\/strong> Module <span style=\"color: #ff0000;\"><em>(not a Menu module!)<\/em><\/span> to the row:<\/p>\n<p><a href=\"https:\/\/www.megamenu.com\/wp-content\/uploads\/2019\/10\/divi-code-module.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-217613\" src=\"https:\/\/www.megamenu.com\/wp-content\/uploads\/2019\/10\/divi-code-module.png\" alt=\"\" width=\"2646\" height=\"1692\" srcset=\"https:\/\/www.megamenu.com\/wp-content\/uploads\/2019\/10\/divi-code-module.png 2646w, https:\/\/www.megamenu.com\/wp-content\/uploads\/2019\/10\/divi-code-module-300x192.png 300w, https:\/\/www.megamenu.com\/wp-content\/uploads\/2019\/10\/divi-code-module-768x491.png 768w, https:\/\/www.megamenu.com\/wp-content\/uploads\/2019\/10\/divi-code-module-1024x655.png 1024w, https:\/\/www.megamenu.com\/wp-content\/uploads\/2019\/10\/divi-code-module-50x32.png 50w\" sizes=\"auto, (max-width: 2646px) 100vw, 2646px\" \/><\/a><\/p>\n<p>Paste the menu shortcode into the Text Box:<\/p>\n<pre class=\"lang:default decode:true\"><!-- menu not found [maxmegamenu] --><\/pre>\n<p>(This shortcode can also be found on the <em>Mega Menu &gt; Menu Locations<\/em> page)<\/p>\n<p><a href=\"https:\/\/www.megamenu.com\/wp-content\/uploads\/2019\/10\/divi-menu-shortcode.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-217615\" src=\"https:\/\/www.megamenu.com\/wp-content\/uploads\/2019\/10\/divi-menu-shortcode.png\" alt=\"\" width=\"2646\" height=\"1692\" srcset=\"https:\/\/www.megamenu.com\/wp-content\/uploads\/2019\/10\/divi-menu-shortcode.png 2646w, https:\/\/www.megamenu.com\/wp-content\/uploads\/2019\/10\/divi-menu-shortcode-300x192.png 300w, https:\/\/www.megamenu.com\/wp-content\/uploads\/2019\/10\/divi-menu-shortcode-768x491.png 768w, https:\/\/www.megamenu.com\/wp-content\/uploads\/2019\/10\/divi-menu-shortcode-1024x655.png 1024w, https:\/\/www.megamenu.com\/wp-content\/uploads\/2019\/10\/divi-menu-shortcode-50x32.png 50w\" sizes=\"auto, (max-width: 2646px) 100vw, 2646px\" \/><\/a><\/p>\n<p>Save the module, then expand the three dots within the purple circle and click Save there also.<\/p>\n<h4>Full Width Menu<\/h4>\n<p>The previous steps will result in a &#8220;boxed&#8221; menu. To make the menu full width, add a full width section and repeat the previous steps.<\/p>\n<p><a href=\"https:\/\/www.megamenu.com\/wp-content\/uploads\/2019\/10\/divi-full-width-section.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-217618\" src=\"https:\/\/www.megamenu.com\/wp-content\/uploads\/2019\/10\/divi-full-width-section.png\" alt=\"\" width=\"2646\" height=\"1692\" srcset=\"https:\/\/www.megamenu.com\/wp-content\/uploads\/2019\/10\/divi-full-width-section.png 2646w, https:\/\/www.megamenu.com\/wp-content\/uploads\/2019\/10\/divi-full-width-section-300x192.png 300w, https:\/\/www.megamenu.com\/wp-content\/uploads\/2019\/10\/divi-full-width-section-768x491.png 768w, https:\/\/www.megamenu.com\/wp-content\/uploads\/2019\/10\/divi-full-width-section-1024x655.png 1024w, https:\/\/www.megamenu.com\/wp-content\/uploads\/2019\/10\/divi-full-width-section-50x32.png 50w\" sizes=\"auto, (max-width: 2646px) 100vw, 2646px\" \/><\/a><\/p>\n<h3>Removing white space from around the menu<\/h3>\n<p>By default there will be a lot of white space around the menu. You can remove this by editing the module <strong>and<\/strong> row settings and setting the Margin and Padding options to 0px. You may need to make other adjustments to suit your own requirements.<\/p>\n<p><a href=\"https:\/\/www.megamenu.com\/wp-content\/uploads\/2019\/10\/divi-module-whitespace.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-217620\" src=\"https:\/\/www.megamenu.com\/wp-content\/uploads\/2019\/10\/divi-module-whitespace.png\" alt=\"\" width=\"2646\" height=\"1692\" srcset=\"https:\/\/www.megamenu.com\/wp-content\/uploads\/2019\/10\/divi-module-whitespace.png 2646w, https:\/\/www.megamenu.com\/wp-content\/uploads\/2019\/10\/divi-module-whitespace-300x192.png 300w, https:\/\/www.megamenu.com\/wp-content\/uploads\/2019\/10\/divi-module-whitespace-768x491.png 768w, https:\/\/www.megamenu.com\/wp-content\/uploads\/2019\/10\/divi-module-whitespace-1024x655.png 1024w, https:\/\/www.megamenu.com\/wp-content\/uploads\/2019\/10\/divi-module-whitespace-50x32.png 50w\" sizes=\"auto, (max-width: 2646px) 100vw, 2646px\" \/><\/a><\/p>\n<h3>Fix z-index<\/h3>\n<p>If your menu is appearing behind other page elements, go to <em>Appearance &gt; Customize &gt; Additional CSS<\/em> and add the following:<\/p>\n<pre class=\"lang:default decode:true\">header {\r\n    position: relative;\r\n    z-index: 9999999;\r\n}<\/pre>\n<h3>End Result<\/h3>\n<p>We now have a &#8220;stock&#8221; version of Max Mega Menu output on the site:<\/p>\n<p><a href=\"https:\/\/www.megamenu.com\/wp-content\/uploads\/2019\/10\/divi-mega-menu.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-217622\" src=\"https:\/\/www.megamenu.com\/wp-content\/uploads\/2019\/10\/divi-mega-menu.png\" alt=\"\" width=\"2646\" height=\"1692\" srcset=\"https:\/\/www.megamenu.com\/wp-content\/uploads\/2019\/10\/divi-mega-menu.png 2646w, https:\/\/www.megamenu.com\/wp-content\/uploads\/2019\/10\/divi-mega-menu-300x192.png 300w, https:\/\/www.megamenu.com\/wp-content\/uploads\/2019\/10\/divi-mega-menu-768x491.png 768w, https:\/\/www.megamenu.com\/wp-content\/uploads\/2019\/10\/divi-mega-menu-1024x655.png 1024w, https:\/\/www.megamenu.com\/wp-content\/uploads\/2019\/10\/divi-mega-menu-50x32.png 50w\" sizes=\"auto, (max-width: 2646px) 100vw, 2646px\" \/><\/a><\/p>\n<p>From here we can build the menu out, including <a href=\"https:\/\/www.megamenu.com\/documentation\/theme-editor\/\">changing the styling<\/a>, <a href=\"https:\/\/www.megamenu.com\/documentation\/menu-logo\/\">adding a logo<\/a>, <a href=\"https:\/\/www.megamenu.com\/documentation\/search-box\/\">search box<\/a>, <a href=\"https:\/\/www.megamenu.com\/documentation\/custom-menu-icon\/\">custom icons<\/a> etc.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Divi 4 includes a new header builder. The addition of the header builder allows us to perfectly integrate Max Mega Menu with Divi without the need for custom code or a child theme. Step 1 &#8211; Create the menu This step is the same for all themes. First we need&#8230;<\/p>\n","protected":false},"author":1,"comment_status":"open","ping_status":"open","template":"","format":"standard","meta":{"_uag_custom_page_level_css":"","footnotes":""},"ht-kb-category":[15],"ht-kb-tag":[],"class_list":["post-217607","ht_kb","type-ht_kb","status-publish","format-standard","hentry","ht_kb_category-theme-integration"],"uagb_featured_image_src":[],"uagb_author_info":{"display_name":"Tom Hemsley","author_link":"https:\/\/www.megamenu.com\/author\/megamenu\/"},"uagb_comment_info":0,"uagb_excerpt":"Divi 4 includes a new header builder. The addition of the header builder allows us to perfectly integrate Max Mega Menu with Divi without the need for custom code or a child theme. Step 1 &#8211; Create the menu This step is the same for all themes. First we need...","_links":{"self":[{"href":"https:\/\/www.megamenu.com\/wp-json\/wp\/v2\/ht-kb\/217607","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.megamenu.com\/wp-json\/wp\/v2\/ht-kb"}],"about":[{"href":"https:\/\/www.megamenu.com\/wp-json\/wp\/v2\/types\/ht_kb"}],"author":[{"embeddable":true,"href":"https:\/\/www.megamenu.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.megamenu.com\/wp-json\/wp\/v2\/comments?post=217607"}],"version-history":[{"count":8,"href":"https:\/\/www.megamenu.com\/wp-json\/wp\/v2\/ht-kb\/217607\/revisions"}],"predecessor-version":[{"id":224667,"href":"https:\/\/www.megamenu.com\/wp-json\/wp\/v2\/ht-kb\/217607\/revisions\/224667"}],"wp:attachment":[{"href":"https:\/\/www.megamenu.com\/wp-json\/wp\/v2\/media?parent=217607"}],"wp:term":[{"taxonomy":"ht_kb_category","embeddable":true,"href":"https:\/\/www.megamenu.com\/wp-json\/wp\/v2\/ht-kb-category?post=217607"},{"taxonomy":"ht_kb_tag","embeddable":true,"href":"https:\/\/www.megamenu.com\/wp-json\/wp\/v2\/ht-kb-tag?post=217607"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}