Reputation: 57
I'm creating a side-bar menu for a site, which should only show sub-menus in a currently selected page. The site is in wordpress. I have managed to hide inactive sub-menu items for pages that are not selected using this css:
.sub-menu { display: none; }
.current_page_item .sub-menu, .current_page_parent .sub-menu { display: block;}
But how can I hide the main menu items but still display their sub-menus? Here's a link to the site NOTE: I want to hide ALL the main menu items so that I only have the sub-menus
Help would be much appreciated!
Upvotes: 0
Views: 1527
Reputation: 4642
This will hide the current item anchor.
.current_page_item > a {display:none;}
(You may want to adjust the left margin on the sub items depending on the look you're going for.)
Upvotes: 2