Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #553072

    Hi guys, Im trying to achieve a sidebar menu that only shows the children of the current selected menu item only.

    Here is a perfect example of what I mean http://www.cats.org.uk/cat-care/care-leaflets
    I don’t want to use a plugin to emulate this, but am sure a bit of css can achieve this look.
    How do I go about this?

    Thanks

    Gregg

    #553294

    hello?

    #554116

    Hi!

    Send us a link to your page with the sidebar menu and we’ll see if we can get you some CSS to use.

    Cheers!
    Elliott

    #555904

    hi thank you, details in the private section

    #555934

    Hi!

    Please add following code to Quick CSS

    #nav_menu-22 .current-page-ancestor.current-page-parent .sub-menu {
        display: block;
    }
    #nav_menu-22 .sub-menu {
        display: none;
    }

    Regards,
    Yigit

    #555939

    that seems to only hide the sub menu. Its not displaying it if I click on the parent iterm?

    #556349

    Hi,

    I think you might need a plugin for what you are trying to achieve, maybe this will work out for you? https://wordpress.org/plugins/nextend-accordion-menu/

    Regards,
    Rikard

    #556495

    thanks however as i mentioned earlier im trying to avoid using plugins. Want to use everything inbuilt to the theme as much as possible.

    Woocommerce category menus do the same thing what i am looking for, but thats only for products. It would be good to be able to do that for the normal sidebar custom menus…

    #557326

    Hey!

    The code above should work but the declarations should be reversed. Please replace it with:

    #top #nav_menu-22 .sub-menu {
        display: none;
    }
    
    #top #nav_menu-22 .current-page-parent .sub-menu {
    display: block;
    }

    Remove browser cache then reload the page.

    Best regards,
    Ismael

Viewing 9 posts - 1 through 9 (of 9 total)
  • You must be logged in to reply to this topic.