[wp-trac] [WordPress Trac] #33703: Menu Class: current_sub_item

WordPress Trac noreply at wordpress.org
Fri Sep 4 09:02:56 UTC 2015


#33703: Menu Class: current_sub_item
-------------------------+------------------------------
 Reporter:  atomicjack   |       Owner:
     Type:  enhancement  |      Status:  new
 Priority:  normal       |   Milestone:  Awaiting Review
Component:  Menus        |     Version:  trunk
 Severity:  normal       |  Resolution:
 Keywords:  close        |     Focuses:  ui
-------------------------+------------------------------
Changes (by swissspidy):

 * keywords:   => close


Comment:

 Yikes, I was somehow thinking of admin menus...

 I don't see how this shouldn't be possible for custom menus though.

 You could use `.sub-menu .current-menu-item` or `.current-menu-ancestor
 .current-menu-item` to get only current sub menu items. Using selectors
 like `.menu-item > ul > .current-menu-item` or `.menu-item > ul > li > ul
 .current-menu-item` you can even target specific levels of nested sub menu
 items. CSS is very powerful in this regard.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/33703#comment:5>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list