Opened 10 years ago
Closed 10 years ago
#30722 closed enhancement (fixed)
Twenty Fifteen: Keep sub-menus open when visiting sub-menu pages
Reported by: | zoonini | Owned by: | lancewillett |
---|---|---|---|
Milestone: | 4.2 | Priority: | normal |
Severity: | normal | Version: | 4.1 |
Component: | Bundled Theme | Keywords: | has-patch needs-testing needs-refresh |
Focuses: | Cc: |
Description
A WordPress.com user who's been using Twenty Fifteen noticed that it becomes a bit cumbersome to keep re-opening a sub-menu.
To replicate:
- Create a primary menu with sub-menu items, either through the default or custom menu
- Visit the site on the front end and click the top-level menu item
- Click a sub-menu item
- Note how you need to click the top-level menu item again if you want to visit another sub-menu page in the same section
It would save some user clicks to keep the sub-menu open after it's been first clicked.
As the user puts it:
The problem is that once the user selects one of these nested items and navigates to the page, the nested menu closes again, meaning that the user has to re-click on the parent item over and over again to keep opening up the nested menu to view what other pages are under it. As you can imagine, this becomes very annoying for the user very quickly. Is there any way to customize the menu so that the nested list will stay open as long as the user is on a page that is nested under the same parent item?
Suggested in this forum thread.
Attachments (4)
Change History (15)
#2
@
10 years ago
- Keywords has-patch added
Just display the sub-menu for menu items that has .current_page_ancestor class.
#3
@
10 years ago
Patch is good start. I think it also needs .current-menu-ancestor
selector as well, to cover both fallback menu (pages) and custom menu.
#4
@
10 years ago
Twenty Fifteen doesn't have the fallback page navigation so it should be fine with using just .current-menu-ancestor
.
#6
@
10 years ago
In 30722.1.diff all the work now it’s made with javascript as we need to add ‘toggle’ classes to open submenus.
Also added proper 'font-weight' for .current-menu-ancestor
items
It could be a good enhancement but for the next update since we are so close to the initial release.