Jump to content

wp header | navigation link color | current link color


Recommended Posts

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>

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.