{"id":258954,"date":"2020-08-28T12:31:47","date_gmt":"2020-08-28T11:31:47","guid":{"rendered":"https:\/\/www.megamenu.com\/?post_type=ht_kb&#038;p=258954"},"modified":"2026-03-17T09:43:08","modified_gmt":"2026-03-17T09:43:08","slug":"yootheme","status":"publish","type":"ht_kb","link":"https:\/\/www.megamenu.com\/documentation\/yootheme\/","title":{"rendered":"YooTheme"},"content":{"rendered":"\n<h3 class=\"wp-block-heading\">YooTheme3<\/h3>\n\n\n\n<p>In this example we will replace the theme &#8220;Navbar&#8221; menu location with Max Mega Menu.<\/p>\n\n\n\n<p>To display Max Mega Menu in YooTheme3, first go to <em>Mega Menu &gt; Menu Locations<\/em> and create a new Menu Location. Name the location &#8220;Max Mega Menu Navbar&#8221;.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/www.megamenu.com\/wp-content\/uploads\/2022\/11\/yootheme-1.png\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"669\" src=\"https:\/\/www.megamenu.com\/wp-content\/uploads\/2022\/11\/yootheme-1-1024x669.png\" alt=\"\" class=\"wp-image-360809\" srcset=\"https:\/\/www.megamenu.com\/wp-content\/uploads\/2022\/11\/yootheme-1-1024x669.png 1024w, https:\/\/www.megamenu.com\/wp-content\/uploads\/2022\/11\/yootheme-1-300x196.png 300w, https:\/\/www.megamenu.com\/wp-content\/uploads\/2022\/11\/yootheme-1-768x501.png 768w, https:\/\/www.megamenu.com\/wp-content\/uploads\/2022\/11\/yootheme-1-50x33.png 50w, https:\/\/www.megamenu.com\/wp-content\/uploads\/2022\/11\/yootheme-1-1536x1003.png 1536w, https:\/\/www.megamenu.com\/wp-content\/uploads\/2022\/11\/yootheme-1-2048x1337.png 2048w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure>\n\n\n\n<p>Next go to <em>Appearance &gt; Menus<\/em>. Create a new menu (or select an existing one) and assign it to the new &#8220;Max Mega Menu Navbar&#8221; location. Make sure the menu is <strong>not<\/strong> assigned to the existing &#8220;Navbar&#8221; location.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/www.megamenu.com\/wp-content\/uploads\/2022\/11\/yootheme-2.png\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"676\" src=\"https:\/\/www.megamenu.com\/wp-content\/uploads\/2022\/11\/yootheme-2-1024x676.png\" alt=\"\" class=\"wp-image-360810\" srcset=\"https:\/\/www.megamenu.com\/wp-content\/uploads\/2022\/11\/yootheme-2-1024x676.png 1024w, https:\/\/www.megamenu.com\/wp-content\/uploads\/2022\/11\/yootheme-2-300x198.png 300w, https:\/\/www.megamenu.com\/wp-content\/uploads\/2022\/11\/yootheme-2-768x507.png 768w, https:\/\/www.megamenu.com\/wp-content\/uploads\/2022\/11\/yootheme-2-50x33.png 50w, https:\/\/www.megamenu.com\/wp-content\/uploads\/2022\/11\/yootheme-2-1536x1015.png 1536w, https:\/\/www.megamenu.com\/wp-content\/uploads\/2022\/11\/yootheme-2-2048x1353.png 2048w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure>\n\n\n\n<p>To display the menu location, go to <em>Appearance &gt; Widgets<\/em> and add the Max Mega Menu widget to the &#8220;Navbar&#8221; widget area. Select &#8220;Max Mega Menu Navbar&#8221; as the location to display:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/www.megamenu.com\/wp-content\/uploads\/2022\/11\/yootheme-3.png\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"700\" src=\"https:\/\/www.megamenu.com\/wp-content\/uploads\/2022\/11\/yootheme-3-1024x700.png\" alt=\"\" class=\"wp-image-360813\" srcset=\"https:\/\/www.megamenu.com\/wp-content\/uploads\/2022\/11\/yootheme-3-1024x700.png 1024w, https:\/\/www.megamenu.com\/wp-content\/uploads\/2022\/11\/yootheme-3-300x205.png 300w, https:\/\/www.megamenu.com\/wp-content\/uploads\/2022\/11\/yootheme-3-768x525.png 768w, https:\/\/www.megamenu.com\/wp-content\/uploads\/2022\/11\/yootheme-3-50x34.png 50w, https:\/\/www.megamenu.com\/wp-content\/uploads\/2022\/11\/yootheme-3-1536x1051.png 1536w, https:\/\/www.megamenu.com\/wp-content\/uploads\/2022\/11\/yootheme-3-2048x1401.png 2048w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure>\n\n\n\n<p>If required, you can repeat the same technique to replace other menu locations with Max Mega Menu.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Widgets do not display within sub menus<\/h3>\n\n\n\n<p>YooThemes alters the way widgets are processed by WordPress, which prevents widgets from displaying within sub menus.<\/p>\n\n\n\n<p>Unfortunately there is currently no <em>correct<\/em> solution for this, as it requires editing the theme files directly.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>Temporary Workaround<\/strong><\/h4>\n\n\n\n<p><strong>Step 1<\/strong><\/p>\n\n\n\n<p>Edit <span class=\"crayon-inline lang:default decode:true\">vendor\/yootheme\/theme-wordpress-widgets\/src\/WidgetsListener.php<\/span>\u00a0, find:<\/p>\n\n\n\n<div class=\"wp-block-urvanov-syntax-highlighter-code-block\"><pre class=\"lang:default decode:true \" >public function displayWidget(Config $config, $instance, $widget, $args)\n{<\/pre><\/div>\n\n\n\n<p>Replace with:<\/p>\n\n\n\n<div class=\"wp-block-urvanov-syntax-highlighter-code-block\"><pre class=\"lang:default decode:true \" >public function displayWidget(Config $config, $instance, $widget, $args)\n{\n    if ( in_array( $args['id'], apply_filters(\"yootheme_exclude_sidebars\", array() ) ) ) {\n        return $instance;\n    }<\/pre><\/div>\n\n\n\n<p><em>Please note you will need to reapply this change each time the theme is updated. <strong>We are attempting to work with YooTheme in order to get this change added directly to the theme itself. If you are reading this and are in contact with YooTheme support, please link them to this page and request they make this change to the theme.<\/strong><\/em><\/p>\n\n\n\n<p><strong>Step 2<\/strong><\/p>\n\n\n\n<p>In your <a href=\"https:\/\/developer.wordpress.org\/themes\/advanced-topics\/child-themes\/\">Child Themes<\/a> functions.php file, add the following:<\/p>\n\n\n\n<div class=\"wp-block-urvanov-syntax-highlighter-code-block\"><pre class=\"lang:default decode:true \" >function megamenu_enable_widgets_in_menu($sidebars) {\n\t$sidebars[] = 'mega-menu';\n\treturn $sidebars;\n}\nadd_filter(\"yootheme_exclude_sidebars\", \"megamenu_enable_widgets_in_menu\");<\/pre><\/div>\n","protected":false},"excerpt":{"rendered":"<p>YooTheme3 In this example we will replace the theme &#8220;Navbar&#8221; menu location with Max Mega Menu. To display Max Mega Menu in YooTheme3, first go to Mega Menu &gt; Menu Locations and create a new Menu Location. Name the location &#8220;Max Mega Menu Navbar&#8221;. Next go to Appearance &gt; Menus&#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-258954","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":"YooTheme3 In this example we will replace the theme &#8220;Navbar&#8221; menu location with Max Mega Menu. To display Max Mega Menu in YooTheme3, first go to Mega Menu &gt; Menu Locations and create a new Menu Location. Name the location &#8220;Max Mega Menu Navbar&#8221;. Next go to Appearance &gt; Menus....","_links":{"self":[{"href":"https:\/\/www.megamenu.com\/wp-json\/wp\/v2\/ht-kb\/258954","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=258954"}],"version-history":[{"count":13,"href":"https:\/\/www.megamenu.com\/wp-json\/wp\/v2\/ht-kb\/258954\/revisions"}],"predecessor-version":[{"id":439563,"href":"https:\/\/www.megamenu.com\/wp-json\/wp\/v2\/ht-kb\/258954\/revisions\/439563"}],"wp:attachment":[{"href":"https:\/\/www.megamenu.com\/wp-json\/wp\/v2\/media?parent=258954"}],"wp:term":[{"taxonomy":"ht_kb_category","embeddable":true,"href":"https:\/\/www.megamenu.com\/wp-json\/wp\/v2\/ht-kb-category?post=258954"},{"taxonomy":"ht_kb_tag","embeddable":true,"href":"https:\/\/www.megamenu.com\/wp-json\/wp\/v2\/ht-kb-tag?post=258954"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}