Having issues highlighting some pages
-
For some reason I can’t seem to get all of my pages to highlight the current page. The home and about pages seem to work fine, but not the others:
Here is the code:
-
<li<?php if ( is_page(‘no-gym-fitness’)) { echo ‘ class=”current_page_item”‘; } ?>>HOME
<li<?php if ( is_page(‘about’)) { echo ‘ class=”current_page_item”‘; } ?>>ABOUT
<li<?php if ( is_page(‘fitness-programs’)) { echo ‘ class=”current_page_item”‘; } ?>>FITNESS PROGRAMS
<li<?php if ( is_page(‘rates’)) { echo ‘ class=”current_page_item”‘; } ?>>RATES
<li<?php if ( is_page(‘press’)) { echo ‘ class=”current_page_item”‘; } ?>>PRESS
<li<?php if ( is_page(‘success-stories’)) { echo ‘ class=”current_page_item”‘; } ?>>SUCCESS STORIES
<li<?php if ( is_page(‘fit-blog’)) { echo ‘ class=”current_page_item”‘; } ?>>FIT BLOG
<li<?php if ( is_page(‘faq’)) { echo ‘ class=”current_page_item”‘; } ?>>FAQCSS:
.current_page_item {
color: #64101A!important;
text-decoration: underline;
}.current_page_item a, .current_page_item a:hover {
display: block;
text-decoration: underline;
color: #64101A!important;
}Any help would be greatly appreciated!!
- The topic ‘Having issues highlighting some pages’ is closed to new replies.