• Resolved thegoogoodoll

    (@thegoogoodoll)


    As being said in the topic, the “CSS highlight current” css funktion works fine with the pages, but when Im in th blog it doesnt work. It does not highlight the blog-button.

    How do I solve this?

    This is an example of my blog. The theme is called “silverlight”.
    http://www.rickfalkvinge.se

    brgds / Rille

Viewing 4 replies - 1 through 4 (of 4 total)
  • 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.

    Thread Starter thegoogoodoll

    (@thegoogoodoll)

    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() ) { ?> &raquo; 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>
    Thread Starter thegoogoodoll

    (@thegoogoodoll)

    ahh… works perfect. Thanx to both of you!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Highlight “current” works fine with pages, but nog at all with the blog.’ is closed to new replies.