w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
Add active class to a menu link with WordPress

Well, you have two nice options to do that:

The first one is to add a class name to single.php main div and than add in your CSS file a property like: .singleClass .nav-menu ul li a {color: red; //any setting you would like }

The other way is adding that custom class to the menu by changing menu_class in the call of the menu into the page.

If this is not working for you i would like to hear more about your theme hierarchy so i could be more specific with my answer.





© Copyright 2018 w3hello.com Publishing Limited. All rights reserved.