wordpress submenu css show on parent active and child active -
i using wordpress menu in sidebar on website. want have second level child items on site show when parent menu item selected.
http://tropicana.net/dev2014/meetings/function-space/
i able use css make function space sub items show when you're on function space page. however, when go second level pages (such ballroom) sub menu items go away again.
div.custom-sidebar .menu li ul { display:none; } div.custom-sidebar .menu li.current_page_item > ul, .menu li.current-menu-item > ul { display:block; }
how make submenu items show on both top level page when active, , on sub menu pages (the ballroom, tropicana showroom, grand exhibition center, havana tower function space, south tower function space)
note: have sub menus on several differnt pages, need css generic sidebar menu, not "meetings-menu" class.
add .current-menu-ancestor current menu item selectors, follows:
div.custom-sidebar .menu li.current_page_item > ul, div.custom-sidebar .menu li.current-menu-ancestor > ul, .menu li.current-menu-item > ul, .menu li.current-menu-ancestor > ul {display:block;}
Comments
Post a Comment