css - How to style current menu parent and item -
i need assistance in wordpress project i'm working on. 1 of pages having submenus; want style such if click on submenu, both parent menu , clicked submenu take on styling. have tried targeting , styling current-menu-parent
, current-menu-item
classes seen on inspect element doesn't achieve desired result. tried current_page_parent
/item
classes, no avail. please note i'm working offline wamp. assistance appreciated.
the parent page not have class "current_page_item" or "current-menu-item" anymore, because child-page current.
to solve this, wordpress adds class parent menu-item of current page. class called "current_page_ancestor", apply desired styling class aswell.
Comments
Post a Comment