{"id":111156,"date":"2017-04-19T10:55:46","date_gmt":"2017-04-19T09:55:46","guid":{"rendered":"https:\/\/www.megamenu.com\/documentation\/custom-theme-integration-copy\/"},"modified":"2017-04-26T16:29:22","modified_gmt":"2017-04-26T15:29:22","slug":"switch-mega-menu-to-flyout-menu-on-mobile","status":"publish","type":"ht_kb","link":"https:\/\/www.megamenu.com\/documentation\/switch-mega-menu-to-flyout-menu-on-mobile\/","title":{"rendered":"How to switch a mega menu to a flyout menu on mobile"},"content":{"rendered":"<p>We often get asked how to switch a mega menu to a fly out menu on mobile.<\/p>\n<p>There is no built in option to let you do this automatically (as mega menus can contain widgets, but fly out menus cannot, so we cannot automatically switch between the two styles reliably), but it&#8217;s possible to achieve the same result with a few extra steps.<\/p>\n<p>You can also follow these steps if you are not happy with how a mega menu appears on mobile. By following these steps, you will learn how it is possible to create one mega menu that is displayed on desktop, and a new\/different mega menu that is only displayed on mobile.<\/p>\n<h3>Example<\/h3>\n<p>In this example we&#8217;ll make some adjustments so that\u00a0the &#8220;About&#8221; menu item\u00a0and sub menu appears as a flyout menu on mobiles.<\/p>\n<p><a href=\"https:\/\/www.megamenu.com\/wp-content\/uploads\/2017\/04\/menu-items-1.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-111871 size-full\" src=\"https:\/\/www.megamenu.com\/wp-content\/uploads\/2017\/04\/menu-items-1.png\" alt=\"\" width=\"2380\" height=\"1736\" srcset=\"https:\/\/www.megamenu.com\/wp-content\/uploads\/2017\/04\/menu-items-1.png 2380w, https:\/\/www.megamenu.com\/wp-content\/uploads\/2017\/04\/menu-items-1-300x219.png 300w, https:\/\/www.megamenu.com\/wp-content\/uploads\/2017\/04\/menu-items-1-768x560.png 768w, https:\/\/www.megamenu.com\/wp-content\/uploads\/2017\/04\/menu-items-1-1024x747.png 1024w, https:\/\/www.megamenu.com\/wp-content\/uploads\/2017\/04\/menu-items-1-50x36.png 50w\" sizes=\"auto, (max-width: 2380px) 100vw, 2380px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<h3>Step 1 &#8211;\u00a0Configure the &#8220;About&#8221; menu item to\u00a0only show on desktop<\/h3>\n<p>The first step is to make sure the &#8220;About&#8221; menu item and sub menu only appear on the desktop version of the menu.<\/p>\n<p>Go to <em>Appearance &gt; Menus<\/em>, hover over the top level menu item (in our case it is &#8220;About&#8221;) and click the blue &#8220;Mega Menu&#8221; button.<\/p>\n<p>In the Settings tab enable &#8220;<strong>Hide item on mobile<\/strong>&#8221; and save the changes.<\/p>\n<p><a href=\"https:\/\/www.megamenu.com\/wp-content\/uploads\/2017\/04\/menu-items-hide-on-mobile-1.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-111872\" src=\"https:\/\/www.megamenu.com\/wp-content\/uploads\/2017\/04\/menu-items-hide-on-mobile-1.png\" alt=\"\" width=\"2380\" height=\"1736\" srcset=\"https:\/\/www.megamenu.com\/wp-content\/uploads\/2017\/04\/menu-items-hide-on-mobile-1.png 2380w, https:\/\/www.megamenu.com\/wp-content\/uploads\/2017\/04\/menu-items-hide-on-mobile-1-300x219.png 300w, https:\/\/www.megamenu.com\/wp-content\/uploads\/2017\/04\/menu-items-hide-on-mobile-1-768x560.png 768w, https:\/\/www.megamenu.com\/wp-content\/uploads\/2017\/04\/menu-items-hide-on-mobile-1-1024x747.png 1024w, https:\/\/www.megamenu.com\/wp-content\/uploads\/2017\/04\/menu-items-hide-on-mobile-1-50x36.png 50w\" sizes=\"auto, (max-width: 2380px) 100vw, 2380px\" \/><\/a>Our &#8220;About&#8221; menu item and sub menu will now only be visible on the desktop menu.<\/p>\n<h3>Step 2 &#8211;\u00a0Add the menu items back to the mobile menu<\/h3>\n<p>We can no longer see the &#8220;About&#8221; menu item or sub menu on mobile, so we now need to create a new top level menu item and sub menu which will only be displayed on mobile.<\/p>\n<p>Under <em>Appearance &gt; Menus<\/em>, re-add your items to the menu (these ones will only be displayed on mobile). For the new &#8220;About&#8221; menu item, enable the &#8220;Hide item on desktop&#8221;.<\/p>\n<p><a href=\"https:\/\/www.megamenu.com\/wp-content\/uploads\/2017\/04\/hide-on-desktop.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-111873\" src=\"https:\/\/www.megamenu.com\/wp-content\/uploads\/2017\/04\/hide-on-desktop.png\" alt=\"\" width=\"2380\" height=\"1736\" srcset=\"https:\/\/www.megamenu.com\/wp-content\/uploads\/2017\/04\/hide-on-desktop.png 2380w, https:\/\/www.megamenu.com\/wp-content\/uploads\/2017\/04\/hide-on-desktop-300x219.png 300w, https:\/\/www.megamenu.com\/wp-content\/uploads\/2017\/04\/hide-on-desktop-768x560.png 768w, https:\/\/www.megamenu.com\/wp-content\/uploads\/2017\/04\/hide-on-desktop-1024x747.png 1024w, https:\/\/www.megamenu.com\/wp-content\/uploads\/2017\/04\/hide-on-desktop-50x36.png 50w\" sizes=\"auto, (max-width: 2380px) 100vw, 2380px\" \/><\/a><\/p>\n<p>You should end up with 2 sets of menu items &#8211; one set which is only displayed on desktop, and a new set which we will only display on mobile.<\/p>\n<h3>End Result<\/h3>\n<p>There are no changes to the desktop menu (we still see the mega menu). However, on mobile, we now see the new &#8220;About&#8221; menu item and flyout sub menu:<\/p>\n<p><a href=\"https:\/\/www.megamenu.com\/wp-content\/uploads\/2017\/04\/mobile-menu.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-111874\" src=\"https:\/\/www.megamenu.com\/wp-content\/uploads\/2017\/04\/mobile-menu.png\" alt=\"\" width=\"1608\" height=\"1736\" srcset=\"https:\/\/www.megamenu.com\/wp-content\/uploads\/2017\/04\/mobile-menu.png 1608w, https:\/\/www.megamenu.com\/wp-content\/uploads\/2017\/04\/mobile-menu-278x300.png 278w, https:\/\/www.megamenu.com\/wp-content\/uploads\/2017\/04\/mobile-menu-768x829.png 768w, https:\/\/www.megamenu.com\/wp-content\/uploads\/2017\/04\/mobile-menu-948x1024.png 948w, https:\/\/www.megamenu.com\/wp-content\/uploads\/2017\/04\/mobile-menu-46x50.png 46w\" sizes=\"auto, (max-width: 1608px) 100vw, 1608px\" \/><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>We often get asked how to switch a mega menu to a fly out menu on mobile. There is no built in option to let you do this automatically (as mega menus can contain widgets, but fly out menus cannot, so we cannot automatically switch between the two styles reliably),&#8230;<\/p>\n","protected":false},"author":1,"comment_status":"open","ping_status":"closed","template":"","format":"standard","meta":{"_uag_custom_page_level_css":"","footnotes":""},"ht-kb-category":[14],"ht-kb-tag":[],"class_list":["post-111156","ht_kb","type-ht_kb","status-publish","format-standard","hentry","ht_kb_category-faqs"],"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 often get asked how to switch a mega menu to a fly out menu on mobile. There is no built in option to let you do this automatically (as mega menus can contain widgets, but fly out menus cannot, so we cannot automatically switch between the two styles reliably),...","_links":{"self":[{"href":"https:\/\/www.megamenu.com\/wp-json\/wp\/v2\/ht-kb\/111156","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=111156"}],"version-history":[{"count":10,"href":"https:\/\/www.megamenu.com\/wp-json\/wp\/v2\/ht-kb\/111156\/revisions"}],"predecessor-version":[{"id":111883,"href":"https:\/\/www.megamenu.com\/wp-json\/wp\/v2\/ht-kb\/111156\/revisions\/111883"}],"wp:attachment":[{"href":"https:\/\/www.megamenu.com\/wp-json\/wp\/v2\/media?parent=111156"}],"wp:term":[{"taxonomy":"ht_kb_category","embeddable":true,"href":"https:\/\/www.megamenu.com\/wp-json\/wp\/v2\/ht-kb-category?post=111156"},{"taxonomy":"ht_kb_tag","embeddable":true,"href":"https:\/\/www.megamenu.com\/wp-json\/wp\/v2\/ht-kb-tag?post=111156"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}