New Nav Menu needs to have ancestor class
|Reported by:||joostdevalk||Owned by:||filosofo|
|Cc:||momo360modena, gvvaughan, aldolat@…, kpdesign|
In the new menu functionality, the only thing that's missing from the "old" wp_list_page method is the parent / ancestor class: I'd like to highlight a menu item even if that menu item's page is only the ancestor page of the current page, to highlight the current section.
To do this, we have to simply match the menu item against the current post->ancestors array. Patch attached.
Change History (49)
- Component changed from General to Menus
- Keywords needs-refresh added; has-patch dev-feedback needs-testing removed
- Owner set to filosofo
comment:10 xibe — 4 years ago
- Keywords has-patch dev-feedback needs-testing added; needs-refresh removed
comment:14 nacin — 4 years ago
- Keywords needs-patch added; has-patch dev-feedback needs-testing removed