Making non-WordPress current menu item highlighted
-
Hi there
A niggly problem that requires a bit of php jiggery pokery…
I have added a second (top) menu to a site I’m building at http://www.theyogaroot.com/proof
[Moderator Note: Please ensure that you are embedding links correctly in your posts. Link corrected.]
The problem I have is that I need the current page menu item to be in a different colour, as indeed it does in the main menu where I used
#top-navigation li.current-page-ancestor a' and
#top-navigation li.current-menu-item > a`This won’t work in the manually produced top menu I’ve produced.
Below is the current code:
<div class="menu2"> <ul> <li><a class="active" href="<?php echo esc_url( home_url( '/' ) ); ?>">Home</a></li><li><a class="active" href="http://www.theyogaroot.com/proof/about">About</a></li> <li><a class="active" href="http://www.theyogaroot.com/proof/contact">Contact</a></li> </ul> </div>
Any help would be much appreciated.
many thanks
Kevin
- The topic ‘Making non-WordPress current menu item highlighted’ is closed to new replies.