• This is a demo for what I’m talking about http://www.sklostudio.com/

    If you click anywhere on the page, it changes the color of the top menu. How do you do that? Better, what’s the easiest way to implement something like that?

Viewing 1 replies (of 1 total)
  • Matt Knowles

    (@aestheticdesign)

    You can use the body class to load different CSS for the menu. In WordPress, each page or post inserts a unique class into the body tag. Then you do something like this in your CSS file:

    .home .menu {
    color: white;
    }

    .aboutus .menu {
    color: black;
    }

    Of course you’ll need to figure out what your actual classes would be.

    The more complex way to do it from a programming way would be to modify your page template so that while editing you can specify a light or dark menu for that page.

    Then you could just insert a light or dark class in the body.

Viewing 1 replies (of 1 total)

The topic ‘How Do I Dynamically Change The WordPress Menu?’ is closed to new replies.