I want to turn off active highlighting on the "home" menu item when other pages are clicked on. As it is now the "home" is always highlighted no matter what page I click on in my top menu.
When I click on "about" for example, both "home" and "about" are then highlighted. I would like it so that only the page menu item that i click on is highlighted.
Try editing header.php and looking for wp_list_pages. Immediately above, try changing:
<li class="current_page_item"><a href="<?php bloginfo('url'); ?>">Home</a></li>
to
<?php if( is_front_page() || is_home() ) $h_style = ' class="current_page_item"';
else $h_style ='';?>
<li<?php echo $h_style;?>><a href="<?php bloginfo('url'); ?>">Home</a></li>
In my header.php the closest I could find is:
<li class="current_page_item<?php if (is_home()) echo ' current_page_item'; ?>">/">Home
<?php wp_list_pages('title_li=' ); ?>
It's different, but is this the code I should change?
Just try changing the first line. Leave <?php wp_list_pages('title_li=' ); ?> alone.
Got it. That worked perfectly!
Thanks very much for your help :)
Glad to hear you got it sorted. :-)
The "resolved" checkbox is just over there -->