Highlight Current page navigation
-
HI
Initially I wanted to change the navigation for my pages so that the word in the navigation says something different to the page title ie. the navigation would say Home but the pages when you opened it would say welcome to XXXX. I couldn’d find a solution for this so am trying to follow codex instructions for hand coding the navigation (I don’t know PHP).
http://codex.wordpress.org/Dynamic_Menu_HighlightingBut because I have specified a page to be the landing page/home page instead of the blog as the landing page I can’t get it to work. What I would like is for the current active page navigation to have blue behind it whereas the rest of the nav bar is red –
this is what I have got at the moment, which works for the links but I don’t know how I would specify the new specified home page. At the moment it is all set up locally on my machine so the home page is at http://localhost:8888/wordpress/ can anybody help me please?
Thanks
<div id=”menu”>
-
<!– To show “current” on the Fitness Classes Page –>
<li<?php
if (is_page(‘classes’))
{
echo ” id=\”current\””;
}?>>
/classes/”>classes<!– To show “current” on the blog page–>
<li<?php
if (is_home())
{
echo ” id=\”current\””;
}?>>
/blog-2/”>blog</div
#menu #current
{
background-color: #00afda;
padding: 6px 0 6px 0;
}
The topic ‘Highlight Current page navigation’ is closed to new replies.