burntpixel Posted November 25, 2009 Share Posted November 25, 2009 In need of some php knowledge. I am working with a template for wordpress and need the link of the current selected page to remain a certain color (different from the others). I had some help from another fella but he did not include the blog link and now when I add the blog link another link is highlighted. Any help would be greatly appreciated. Here is My Site and here is the header.php <!-- Navigation --> <ul class="sf-menu"> <li <?php if (is_home()) { echo " id=\"current\""; }?>> <a href="<?php bloginfo('url') ?>">Home</a> </li> <!--<li class="cat-item">--> <li class="<?php if ( is_category() or is_single() or (function_exists('is_tag') and is_tag()) ) { ?>current-cat-parent<?php } else { ?>cat_item<?php } ?>"> <a href="#">Work</a> <ul class="children"> <?php wp_list_categories("exclude=$blog_ID&title_li=");('orderby=name&title_li='); $this_category = get_category($cat); if (get_category_children($this_category->cat_ID) != "") { echo "<ul>"; wp_list_categories('orderby=id&show_count=0&title_li= &use_desc_for_title=1&child_of='.$this_category->cat_ID); echo "</ul>"; } ?> </ul> </li> <li <?php if (is_page('About')) { echo " id=\"current\""; }?>> <a href="<?php bloginfo('url') ?>/about">About</a> </li> <li <?php if (is_page('Contact')) { echo " id=\"current\""; }?>> <a href="<?php bloginfo('url') ?>/contact">Contact</a> </li> <!--<?php wp_list_categories("include=$blog_ID&title_li="); ?>--> </ul> Link to comment https://forums.phpfreaks.com/topic/182963-wp-header-navigation-link-color-current-link-color/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.