{"id":214006,"date":"2019-09-20T11:17:51","date_gmt":"2019-09-20T10:17:51","guid":{"rendered":"https:\/\/www.megamenu.com\/documentation\/widget-copy\/"},"modified":"2019-09-20T11:36:52","modified_gmt":"2019-09-20T10:36:52","slug":"widget","status":"publish","type":"ht_kb","link":"https:\/\/www.megamenu.com\/documentation\/widget\/","title":{"rendered":"Widget"},"content":{"rendered":"<p>Max Mega Menu comes with a built in widget which allows you to display a single menu location within a widget area. Depending on your theme, you might have widget areas set up in the header, footer and sidebar areas. Using the following method we can add a Mega Menu\u00a0to any of these areas.<\/p>\n<div id=\"attachment_3267\" style=\"width: 374px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/www.megamenu.com\/wp-content\/uploads\/2015\/07\/max-mega-menu-widget.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-3267\" class=\"wp-image-3267 size-full\" src=\"https:\/\/www.megamenu.com\/wp-content\/uploads\/2015\/07\/max-mega-menu-widget.png\" alt=\"max-mega-menu-widget\" width=\"364\" height=\"345\" srcset=\"https:\/\/www.megamenu.com\/wp-content\/uploads\/2015\/07\/max-mega-menu-widget.png 364w, https:\/\/www.megamenu.com\/wp-content\/uploads\/2015\/07\/max-mega-menu-widget-300x284.png 300w, https:\/\/www.megamenu.com\/wp-content\/uploads\/2015\/07\/max-mega-menu-widget-125x118.png 125w, https:\/\/www.megamenu.com\/wp-content\/uploads\/2015\/07\/max-mega-menu-widget-75x71.png 75w\" sizes=\"auto, (max-width: 364px) 100vw, 364px\" \/><\/a><p id=\"caption-attachment-3267\" class=\"wp-caption-text\"><strong>You must use the &#8220;Max Mega Menu&#8221; widget <span style=\"color: #ff0000;\">(not the &#8220;Navigation Menu&#8221; widget!)<\/span><\/strong><\/p><\/div>\n<p>If you are using an existing menu location, simply add a Max Mega Menu Widget to your page and select the relevant menu location.<\/p>\n<p>The following steps assume you want to display a brand new mega menu using a widget.<\/p>\n<h3>Step 1: Registering a new menu location.<\/h3>\n<p>First we&#8217;ll need to create a new menu location specifically for use within the widget.<\/p>\n<p>Under<em>\u00a0Mega Menu &gt; Menu Locations<\/em>, click the &#8220;Add another menu location&#8221; link and rename the location to something suitable. In our case we&#8217;ll rename the location to &#8220;Blog Sidebar Menu&#8221;.<\/p>\n<p><a href=\"https:\/\/www.megamenu.com\/wp-content\/uploads\/2015\/07\/menu-locations.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-20804 size-full\" src=\"https:\/\/www.megamenu.com\/wp-content\/uploads\/2015\/07\/menu-locations.png\" width=\"1173\" height=\"724\" \/><\/a><\/p>\n<p>We now have a new menu location which we can use within the Max Mega Menu widget.<\/p>\n<p>Tip: Advanced users may prefer to register a new menu location using the <a href=\"https:\/\/codex.wordpress.org\/Function_Reference\/register_nav_menu\">register_nav_menu<\/a> function.<\/p>\n<h3>Step 2: Assign a menu to the new location<\/h3>\n<p>Under <em>Appearance &gt; Menus<\/em>, create a new menu and assign it to the new menu location.<\/p>\n<div id=\"attachment_3270\" style=\"width: 1275px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/www.megamenu.com\/wp-content\/uploads\/2015\/07\/widget-menu.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-3270\" class=\"wp-image-3270 size-full\" src=\"https:\/\/www.megamenu.com\/wp-content\/uploads\/2015\/07\/widget-menu.png\" alt=\"widget-menu\" width=\"1265\" height=\"688\" srcset=\"https:\/\/www.megamenu.com\/wp-content\/uploads\/2015\/07\/widget-menu.png 1265w, https:\/\/www.megamenu.com\/wp-content\/uploads\/2015\/07\/widget-menu-300x163.png 300w, https:\/\/www.megamenu.com\/wp-content\/uploads\/2015\/07\/widget-menu-1024x557.png 1024w, https:\/\/www.megamenu.com\/wp-content\/uploads\/2015\/07\/widget-menu-125x68.png 125w, https:\/\/www.megamenu.com\/wp-content\/uploads\/2015\/07\/widget-menu-75x41.png 75w\" sizes=\"auto, (max-width: 1265px) 100vw, 1265px\" \/><\/a><p id=\"caption-attachment-3270\" class=\"wp-caption-text\">If you want to display a vertical menu in a sidebar, now is the time to set the &#8220;Orientation&#8221; (in the Max Mega Menu settings box) to either &#8220;Vertical&#8221; or &#8220;Accordion&#8221;.<\/p><\/div>\n<h3>Step 3: Add the Max Mega Menu widget to a sidebar<\/h3>\n<p>Under Appearance &gt; Widgets, drag the <b>Max Mega Menu<\/b> widget\u00a0(<em>not the Navigation Menu widget<\/em>) to a sidebar and select the new menu location.<\/p>\n<p><a href=\"https:\/\/www.megamenu.com\/wp-content\/uploads\/2015\/07\/max-mega-menu-widget-new-location.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-3271\" src=\"https:\/\/www.megamenu.com\/wp-content\/uploads\/2015\/07\/max-mega-menu-widget-new-location.png\" alt=\"max-mega-menu-widget-new-location\" width=\"1260\" height=\"652\" srcset=\"https:\/\/www.megamenu.com\/wp-content\/uploads\/2015\/07\/max-mega-menu-widget-new-location.png 1260w, https:\/\/www.megamenu.com\/wp-content\/uploads\/2015\/07\/max-mega-menu-widget-new-location-300x155.png 300w, https:\/\/www.megamenu.com\/wp-content\/uploads\/2015\/07\/max-mega-menu-widget-new-location-1024x530.png 1024w, https:\/\/www.megamenu.com\/wp-content\/uploads\/2015\/07\/max-mega-menu-widget-new-location-125x65.png 125w, https:\/\/www.megamenu.com\/wp-content\/uploads\/2015\/07\/max-mega-menu-widget-new-location-75x39.png 75w\" sizes=\"auto, (max-width: 1260px) 100vw, 1260px\" \/><\/a><\/p>\n<p>The menu will\u00a0now be displayed in your sidebar.\u00a0You can repeat\u00a0the\u00a0same steps to create\u00a0and display multiple Mega Menus on your site.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Max Mega Menu comes with a built in widget which allows you to display a single menu location within a widget area. Depending on your theme, you might have widget areas set up in the header, footer and sidebar areas. Using the following method we can add a Mega Menu\u00a0to&#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":[17],"ht-kb-tag":[],"class_list":["post-214006","ht_kb","type-ht_kb","status-publish","format-standard","hentry","ht_kb_category-menu-output-options"],"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":"Max Mega Menu comes with a built in widget which allows you to display a single menu location within a widget area. Depending on your theme, you might have widget areas set up in the header, footer and sidebar areas. Using the following method we can add a Mega Menu\u00a0to...","_links":{"self":[{"href":"https:\/\/www.megamenu.com\/wp-json\/wp\/v2\/ht-kb\/214006","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=214006"}],"version-history":[{"count":1,"href":"https:\/\/www.megamenu.com\/wp-json\/wp\/v2\/ht-kb\/214006\/revisions"}],"predecessor-version":[{"id":214011,"href":"https:\/\/www.megamenu.com\/wp-json\/wp\/v2\/ht-kb\/214006\/revisions\/214011"}],"wp:attachment":[{"href":"https:\/\/www.megamenu.com\/wp-json\/wp\/v2\/media?parent=214006"}],"wp:term":[{"taxonomy":"ht_kb_category","embeddable":true,"href":"https:\/\/www.megamenu.com\/wp-json\/wp\/v2\/ht-kb-category?post=214006"},{"taxonomy":"ht_kb_tag","embeddable":true,"href":"https:\/\/www.megamenu.com\/wp-json\/wp\/v2\/ht-kb-tag?post=214006"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}