[wp-hackers] Patch proposal for adding a class to menus with sub-menus

Chris Jean gaarai at gaarai.com
Mon Oct 25 21:01:52 UTC 2010


I just added a new ticket and patch to trac: 
http://core.trac.wordpress.org/ticket/15214

Since CSS doesn't offer a parent selector and sibling selectors only go 
forward when matching, it isn't possible to style a navigation menu item 
that has a sub-menu (drop-down menu) without writing a custom Walker 
class. So, I made a simple patch that adds support for this to both the 
wp_nav_menu and wp_list_pages functions.

If you are interested, please check out the ticket, look at the patch 
(it's a quick 6-liner), and comment on it.

-- 
Chris Jean (AKA gaarai&  chrisbliss18)
Coder for http://ithemes.com/
http://gaarai.com/
@chrisjean



More information about the wp-hackers mailing list