I have a menu structure that looks like this
In my sidebar I have the following code
<?php
wp_nav_menu(array(
'menu' => 'Main Menu',
'theme_location' => 'main-menu',
'container_class' => 'menu-sidebar hidden-xs',
'container' => 'div',
'depth' => '2',
'submenu' => ''.$post->ID.''
));
?>
When I’m in Sustainable Food, Manufacturing and Energy I see the unique information that belongs with each of these pages (Programs, Goals, Stories) but as soon as I click into Program, Goals and Stories the menu no longer exists on these pages.
How do I use the plugin allow me to view menu content that is nested.
Thank You
https://www.ads-software.com/plugins/wordpress-wp-nav-menu-filter/
]]>I just updated WordPress and all plugins and now I get this error
Notice: Undefined property: stdClass::$submenu in …/wp-content/plugins/wordpress-wp-nav-menu-filter/wp_nav_menu_filter.php on line 31
Please help!
https://www.ads-software.com/plugins/wordpress-wp-nav-menu-filter/
]]>Hi, I’m trying to use WordPress wp nav menu Filter with an ID of a top level menu item. What I’m finding is that the submenu ID needs to be a submenu. I’m trying to do this because when viewing a custom post type archive, I need to show a specific menu in the sidebar. If I use a 2nd or 3rd level menu ID this works great but doesn’t seem to work with a top level ID. Is this a bug or is there a way to achieve this another way? Thanks in advance for any help!
if ((is_tax("custom_post_cat") || get_post_type() == "custom_post" {
wp_nav_menu(array( 'container_class' => 'sidebar-menu', 'theme_location' => 'main-menu', 'depth' => '4', 'submenu' => '53' ));
https://www.ads-software.com/plugins/wordpress-wp-nav-menu-filter/
]]>Here’s the error message I got:
Deprecated: Function split() is deprecated in /mnt/stor0-wc2-dfw1/468595/840907/www.k2logistics.com/web/content/wp-content/plugins/wordpress-wp-nav-menu-filter/wp_nav_menu_filter.php on line 35
It seems to only happen when the submenu would have only one item. But I’m not certain.
The manual says split() should be replaced with preg_split(), although I think you could just get by with explode() in this case. Just thought I’d flag it.
Great plugin, by the way! Very useful. Thanks –
Patrick Noonan
https://www.ads-software.com/extend/plugins/wordpress-wp-nav-menu-filter/
]]>Just a tip… I was looking to display the submenu based on the current page ID. All I had to do was change line #59 to output the items when I entered the current id as the “submenu” value.
was…
$cursor = $item->ID;
now…
$cursor = $item->menu_item_parent;
then called it using…
wp_nav_menu(array(
'menu' => 'header',
'submenu' => (string) $post->ID
));
Thanks for the time-saver!
https://www.ads-software.com/extend/plugins/wordpress-wp-nav-menu-filter/
]]>Hello,
please could you explain how can this be used to be inserdted with a widget text?
I mean imagina i would like to show a part of a menu in a footer box
Thank you in advance
https://www.ads-software.com/extend/plugins/wordpress-wp-nav-menu-filter/
]]>I search too much for something like this -) Thank you very much for great plugin 1
https://www.ads-software.com/extend/plugins/wordpress-wp-nav-menu-filter/
]]>