• Hi everyone,

    Wondering if there is a way to keep the menu dropdown open when on the active page? At the moment I am using the standard twentytwelve theme and the dropdown menu disappears when the user navigates to the page.

    Thanks!

Viewing 5 replies - 1 through 5 (of 5 total)
  • Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    Are you using a Child Theme or do you have a Custom CSS plugin installed?

    Thread Starter MBPM

    (@mbpm)

    Hi Andrew,

    Thanks for jumping on this so quickly!

    I was using a child theme but switched back to the twentytwelve to check that out also.

    Not sure if I explained my question very well. In my child theme I have removed the page title and was hoping that I could use a highlighted item in the dropdown menu to indicate the users location on the site. For that to work the menu needs to stay open when on that page.

    I’m hosting this site locally at the moment otherwise I would share a link.

    Cheers

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    In your Child Theme style.css file add:

    .main-navigation li ul {
     display: block;
    }

    Thread Starter MBPM

    (@mbpm)

    Thanks mate, that works great!

    Although, is there a way to implement this on specific pages? Would be amazing if when on other pages that don’t link to the sub-nav it was closed.

    Do I need to look at custom headers for that kind of functionality?

    I’ve tried inserting that style code directly into the WP page that it relates to but it doesn’t seem to work

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    1. Go to the webpage you want it to apply to.
    2. Right click where applicable & select ‘View source’
    3. Search for “<body”
    4. Look at the classes in that element

    You should see a unique class to that page, something like “page-id-83”.

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Keep dropdown menu open on page’ is closed to new replies.