//checks that we are on current page and highlights tab as active if so
if(is_page($page_name)){
echo " <li><a href='$href' class='current_page_item'> $tabname</a></li>";
}
else {
}
if(is_single() && $singlelight=="this_one") {
echo " <li><a href='$href' class='current_page_item'> $tabname</a></li>";
}
else {
echo " <li><a href='$href' > $tabname</a></li>";
}
this code works as i would expect to highlight tabs using the wordpress function is_single and is_page. the problem is it generates 2 tabs for the active one in the menu. so my menu looks like this when 'home' is active.
Home Home Faq Blog Contact
Appreciate any help thanks!