• Derar forum members,

    I have created a vertical menu using OceanWP which works nearly very well.
    There′s only one problem: If I click on an entry which is a submenu, the opened menu collapses after loading the new page.

    –+Menu1
    |
    +– Entry1
    +– Entry2

    After clicking at one of the entries, “Menu1” is closed back after loading the according page.

    Surely you have an idea what my problem is? I think it must be some kind of beginners mistake, isn`t it?

    Thank you very much.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Hello,

    The menu should function like that. It’s not an ajax menu and the page gets reloaded.

    Please try to add the below CSS code from the Appearance > Customize > Custom CSS, and check.

    #site-header.vertical-header #site-navigation-wrap .dropdown-menu > li.current-menu-parent .sub-menu { 
    display: block !important; 
    }

    Or if you just want to highlight the current menu when opening a submenu, you can try the below code.

    .current-page-ancestor>a,
    .current-menu-item >a {
        color: #07cab8 !important;
    }
    
    .current-page-parent>a{ color: initial !important;}
    
    #site-header.vertical-header #site-navigation-wrap .dropdown-menu 
    li.current-page-ancestor > .sub-menu {
        display: block !important;
    }
    Thread Starter svenise

    (@svenise)

    Hey Abhishek,

    I thought that worked in OceanWP after installing it anyway? – but surely I’m wrong.
    Is there a way to change the menu to Ajax?

    Both of your solution work so far. But only for one level sub menus, isn’t it?
    If there’s an additional submenu inside a sub, all is collapsed after reloading.

    Also it isn’t possible to close the menu clicking on it.

    Thanks a lot!

    Unfortunately, it is not possible. You need to consult with a developer to make the features as per your need. When it comes only to a few lines of code, we are more than eager to help everyone achieve the desired look. However, this is really more than that, and I would kindly advise you to consult a professional on this matter.

    @begoclaveria
    I’ve removed your reply, which was actually a question for yourself. Please start a new topic instead to trying to take over someone else’s thread.
    At the same time I’m closing this topic, since it’s been quiet for more than two months now.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Vertical Menu: Submenu collpases after clicking’ is closed to new replies.