WordPress wp nav menu Filter

Adds the ability to pass an argument (pageID or page name) to show a filtered submenu with wp_nav_menu().

Author:Travis Hoglund (profile at wordpress.org)
WordPress version required:3.0.0
WordPress version tested:3.9.1
Plugin version:1.1
Added to WordPress repository:08-03-2012
Last updated:30-07-2014
Warning! This plugin has not been updated in over 2 years. It may no longer be maintained or supported and may have compatibility issues when used with more recent versions of WordPress.
Rating, %:100
Rated by:2
Plugin URI:http://www.travishoglund.com
Total downloads:8 187
Active installs:700+
plugin download
Click to start download

If you have built custom WordPress themes, you have probably ran into needing to display navigation on subpages. Rather than try to manage several navigation menus, or try to output menus with wp_list_pages(), why not manage everything from a single menu, and just pass different parameters to show what you want? Makes sense to me...

To use it, simply add a 'submenu' parameter to the arguments of wp_nav_menu, like so:

wp_nav_menu(array(
  'menu' => 'header',
  'submenu' => 'Solutions' //Using parameter of Page Name
));

----  OR  ----

wp_nav_menu(array(
  'menu' => 'header',
  'submenu' => '46' //Using parameter of Page ID (!important - Passing ID in STRING FORMAT)
));