Allows you to display a sub-menu, it's depth from there on and gives you good control over the menu-item classes.
Uses the native wp_nav_menu() but adds some flexibility.
No configuration required, just adds runtime parameters that can be used to tweak your menu.
This will get the first sub-menu from the active branch and 2 levels beyond (menu + sub-menu + sub-menu):
wp_nav_menu( array( 'level' => 2, 'depth' => 3 ));
Show the whole current branch only:
wp_nav_menu( array( 'level' => 1 ));
Aimed on simple use on various use cases:
// display first level in the header wp_nav_menu( array( 'depth' => 1 )); // display first sub-menu from the current branch somewhere else wp_nav_menu( array( 'depth' => 2, 'level' => 2 ));
Another feature is it's controll over the css classes that are assigned. You might be faced with a html template of which you cannot or do not want to change the css.
Use the filter 'codepress_menu_filter_classes' to define your own class filter.
There are also a few pre-configured variants:
wp_nav_menu( array( 'classes' => 'sanitize' ));
Requires: 3.1 or higher
Compatible up to: 3.4.2
Last Updated: 2013-3-15
0 of 1 support threads in the last two months have been resolved.
Got something to say? Need help?