It seems that Blogg Tab written hard coded in header.php file.
If you want to highlight Blogg Tab only on home page, just change
- tag of Blogg Tabs to <li <?php if(is_home()) echo ‘class=”current_page_item”‘;?>> in header.php file.
Or if you want to highlight Bloggs Tab on all link except pages, just change
- tag of Blogg Tabs to <li <?php if(!(is_page())) echo ‘class=”current_page_item”‘;?>> in header.php file.
It might help you.
Hi!
Thanx very much.
Im not really sure I understand exactly, but it feels like we are close to solve this! =)
What I want to accomplish is this: I want all the links at the top of the blog(the bloglink to the left, and ofcourse all of the pages) to show “current”.
My header.php looks like this btw:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head profile="http://gmpg.org/xfn/11">
<meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" />
<title><?php bloginfo('name'); ?> <?php if ( is_single() ) { ?> » Blog Archive <?php } ?> <?php wp_title(); ?></title>
<meta name="generator" content="WordPress <?php bloginfo('version'); ?>" /> <!-- leave this for stats -->http://wordpress.org/support/topic/266889?replies=1#post-1061664
<link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>" type="text/css" media="screen" />
<link rel="alternate" type="application/rss+xml" title="<?php bloginfo('name'); ?> RSS Feed" href="<?php bloginfo('rss2_url'); ?>" />
<link rel="pingback" href="<?php bloginfo('pingback_url'); ?>" />
<?php wp_head(); ?>
</head>
<body>
<div id="ddnav">
<div id="nav">
<ul class="nav">
<?php wp_list_pages('title_li='); ?>
</ul>
</div>
I think you can implement his solution by using this:
<ul class="nav">
<li <?php if(is_home()) echo 'class="current_page_item"';?>><a href="<?php bloginfo('url'); ?>" title="Blogg">Blogg</a></li>
<?php wp_list_pages('title_li='); ?>
</ul>
ahh… works perfect. Thanx to both of you!