Menu ancestory when a page has more than one menu entry
-
I am having a problem with the menu ancestry in two situations:
1) when a menu item occurs more than once in the same menu
Sample:
- Item A
- Item A1
- Item A2
- Support
- Item B
- Item B1
- News
- Support
Support occurs in both Item A and Item B menus, which results in both Item A and Item B receiving the ancestry classes (current-menu-ancestor current-menu-parent).
I need some way to remove the ‘current-menu-****’ classes from the duplicate menu item.
2) When I am on a category detail page.
Example: If News above is a category archive, then when I am on a post page filed under the News category there do not seem specific classes that allow me to highlight both Item B and News.
—
I thought perhaps a custom walker looked promising, but at this point I cant wrap my head around how to determine the true ancestory (based on page heirarchy and/or category) for the current page.Any help appreciated!
- The topic ‘Menu ancestory when a page has more than one menu entry’ is closed to new replies.