Active menu item in WordPress

Active menu item in WordPress

Being a visual designer who does a bit of code, making sites in WordPress can be a bit of a pain in some ways compared to a non-CMS website. A big realization for me was to view the source code of my project, and see the code being output, rather than the PHP files. WordPress creates a bunch of classes that you can apply styles to. One thing I like to do is create a style for an active menu item, which helps the user know where on the website they are. Here is an example of applying an active state to a WordPress menu item:

 

#menu li.current-menu-item a {
color: #CE0000;
}

Please follow and like us: