Opened 13 years ago
Last modified 6 years ago
#18816 new enhancement
Add 'offset' parameter and 'ancestral' boolean to wp_nav_menu
Reported by: | signyourbikeout | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | |
Component: | Menus | Keywords: | dev-feedback needs-patch |
Focuses: | Cc: |
Description
Since we can now call wp_nav_menu multiple times and there is the very useful 'depth' parameter, I believe adding an 'offset' parameter would be very beneficial in many situations. This would allow you to start at the children of the main pages for example and combined with depth it becomes very powerful. An 'ancestral' => 'true' option could output only menu items that the current page is a descendant of. Currently if you want to display a main menu in the header and then a submenu on page.php you either need a tricky custom walker or terrible CSS 'visibility:hidden' or 'display:none' situations.
Change History (4)
#2
@
10 years ago
- Component changed from General to Menus
@signyourbikeout: Would you like to try your hand at a patch or proof of concept?
Note: See
TracTickets for help on using
tickets.
Thoughts on the proposal dev team?