Viewing 1 replies (of 1 total)
  • 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.