{"id":243957,"date":"2020-05-15T15:26:13","date_gmt":"2020-05-15T14:26:13","guid":{"rendered":"https:\/\/www.megamenu.com\/documentation\/storevilla-copy\/"},"modified":"2021-03-23T14:05:19","modified_gmt":"2021-03-23T14:05:19","slug":"generatepress","status":"publish","type":"ht_kb","link":"https:\/\/www.megamenu.com\/documentation\/generatepress\/","title":{"rendered":"GeneratePress"},"content":{"rendered":"<p>We find Max Mega Menu works well with GeneratePress &#8220;out of the box&#8221;. However, if you are experiencing issues with residual styling, please follow the steps below.<\/p>\n<h3>Fix Residual Theme Styling<\/h3>\n<p>First create and activate a <a href=\"https:\/\/developer.wordpress.org\/themes\/advanced-topics\/child-themes\/\">Child Theme<\/a>.<\/p>\n<p>In the child theme <strong>functions.php<\/strong> file, add the following:<\/p>\n<pre class=\"lang:default decode:true \">function megamenu_remove_main_navigation_class( $classes ) {\r\n\t$new_classes = array();\r\n\r\n\tforeach ($classes as $class) {\r\n\t\tif ($class != 'main-navigation') {\r\n\t\t\t$new_classes[] = $class;\r\n\t\t}\r\n\t}\r\n\r\n\treturn $new_classes;\r\n}\r\nadd_filter(\"generate_navigation_class\", \"megamenu_remove_main_navigation_class\", 11);<\/pre>\n<h3>Applying a background colour to the navigation row<\/h3>\n<p>To restore the background color, go to <em>Appearance &gt; Customize &gt; Additional CSS<\/em> and add the following:<\/p>\n<pre class=\"lang:default decode:true \">#site-navigation {\r\n    background-color: #222222;\r\n}<\/pre>\n<h3>Making the menu full width<\/h3>\n<p>The menu position can be changed using the GeneratePress theme options.<\/p>\n<p>Go to <em>Appearance &gt; Customize &gt; Layout &gt; Primary Navigation<\/em> and set Navigation Location to &#8220;Below Header&#8221;.<\/p>\n<h3>Hide the theme logo<\/h3>\n<p>If you have <a href=\"https:\/\/www.megamenu.com\/documentation\/menu-logo\/\">added your logo directly to the menu<\/a>, go to <em>Appearance &gt; Customize &gt; Additional CSS<\/em> and add the following:<\/p>\n<pre class=\"lang:default decode:true \">header#masthead {\r\n\tdisplay: none;\r\n}<\/pre>\n<h3>GeneratePress Premium<\/h3>\n<p>If you are using the Secondary Menu location, add the following to your themes functions.php file to fix the residual styling issues:<\/p>\n<pre class=\"lang:default decode:true \">function megamenu_remove_secondary_navigation_class( $classes, $class ) {\r\n\tif ( function_exists(\"max_mega_menu_is_enabled\") &amp;&amp; max_mega_menu_is_enabled(\"secondary\") ) {\r\n\t\t$new_classes = array();\r\n\r\n\t\tforeach ($classes as $class) {\r\n\t\t\tif ($class != 'secondary-navigation') {\r\n\t\t\t\t$new_classes[] = $class;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn $new_classes;\r\n\t}\r\n\r\n\treturn $classes;\r\n}\r\nadd_filter(\"generate_secondary_navigation_class\", \"megamenu_remove_secondary_navigation_class\", 11, 2);<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>We find Max Mega Menu works well with GeneratePress &#8220;out of the box&#8221;. However, if you are experiencing issues with residual styling, please follow the steps below. Fix Residual Theme Styling First create and activate a Child Theme. In the child theme functions.php file, add the following: function megamenu_remove_main_navigation_class( $classes&#8230;<\/p>\n","protected":false},"author":1,"comment_status":"closed","ping_status":"closed","template":"","format":"standard","meta":{"_uag_custom_page_level_css":"","footnotes":""},"ht-kb-category":[15],"ht-kb-tag":[],"class_list":["post-243957","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":"We find Max Mega Menu works well with GeneratePress &#8220;out of the box&#8221;. However, if you are experiencing issues with residual styling, please follow the steps below. Fix Residual Theme Styling First create and activate a Child Theme. In the child theme functions.php file, add the following: function megamenu_remove_main_navigation_class( $classes...","_links":{"self":[{"href":"https:\/\/www.megamenu.com\/wp-json\/wp\/v2\/ht-kb\/243957","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=243957"}],"version-history":[{"count":8,"href":"https:\/\/www.megamenu.com\/wp-json\/wp\/v2\/ht-kb\/243957\/revisions"}],"predecessor-version":[{"id":288565,"href":"https:\/\/www.megamenu.com\/wp-json\/wp\/v2\/ht-kb\/243957\/revisions\/288565"}],"wp:attachment":[{"href":"https:\/\/www.megamenu.com\/wp-json\/wp\/v2\/media?parent=243957"}],"wp:term":[{"taxonomy":"ht_kb_category","embeddable":true,"href":"https:\/\/www.megamenu.com\/wp-json\/wp\/v2\/ht-kb-category?post=243957"},{"taxonomy":"ht_kb_tag","embeddable":true,"href":"https:\/\/www.megamenu.com\/wp-json\/wp\/v2\/ht-kb-tag?post=243957"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}