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

Popular posts from this blog

javascript - Jquery show_hide, what to add in order to make the page scroll to the bottom of the hidden field once button is clicked -

javascript - Highcharts multi-color line -

javascript - Enter key does not work in search box -