Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #459034

    Hello,

    Please take a look at this site:

    http://bosbeek.denatuurvrienden.nl/

    There are two submenu’s on ‘Het huis’ en ‘De omgeving’

    If I’m on one of the pages, for example ‘Het huis’:
    http://bosbeek.denatuurvrienden.nl/het-huis/

    I want to hide the submenu in the main menu, because I have a submenu in the page itself.
    How can I hide the submenu only on that page? I’ve found the CSS for hidding a submenu, but then it hides on every page.
    I can get it to work on a certain page. I’ve tried a few CSS codes but I can’t get it to work with a page-id class combined.

    Can you help me with the right code?

    Greets Jeen

    #459831

    Hey Groeier!!

    You can try:

    .page-id-19 .sub-menu{
    display: none !important;
    }

    Cheers!
    Josue

    #459925

    Hello Josue,

    Thanks for the reply. With that code all the submenu’s will dissapear.
    On page with id 19 I only need the submenu go away from that page, not all the submenu’s.
    So I think it has to be a mix with the menu-id…

    Gr. ,Jeen

    #459980

    Hey!

    Yes, if you inspect the menu items you’ll see that each item gets an ID so the code would be something like:

    .page-id-19 #menu-item-381 .sub-menu{
    display: none !important;
    }
    

    Regards,
    Josue

    #460670

    Hello Josue,

    Thanks! It works perfect!!!!

    Greets Jeen

Viewing 5 posts - 1 through 5 (of 5 total)
  • The topic ‘Hide submenu on certain pages’ is closed to new replies.