Keep nav active on specific pages?
-
So I want it so when your on the https://www.sitename.com/about-jane-smith that the ABOUT link I have stays in the active state.
What I have so far for the navigation is this.
CSS:.nav02{ float:left; display:block; overflow:hidden; width:76px; height:119px; background:url(/wp-content/themes/child/images/nav01.png) no-repeat 0 0; }
and then inc_nav.php which is an include from header.php
<a class="nav02" href="/about-jane-smith">
What I was attempting in my very limited PHP knowledge was this:
if ($firstURIvar == 'about') { $hover = "-119px"; }
But this is obviously causing me problems. Any help would be greatly appreciated.
- The topic ‘Keep nav active on specific pages?’ is closed to new replies.