• I am using Fauna Nocturnal style on WordPress 2.5 and I am having some difficulties getting the top nav menu to highlight the current page in the way I think it should. It works as I think it should if I am on the home page or if I am on my Archives or Contact page. For any other page however, the ‘home’ links is shown as the current page. Looking at the code for this in the header, I would have thought that when viewing a post or category archive, the ‘archives’ link would show as the current page. This is not happening though, and I wonder if someone knows why, or if I have misunderstood how this should work. (Header code is below.) The site in question is here.

    In addition, I added a page and then using the “Page Links To” plugin had it point to a custom category template. This page therefore shows in the top menu as ‘gallery’, but the link goes to a category archive for my ‘gallery’ category, which is category number 34. I have tried modifying the header.php file so that ‘gallery’ is highlighted as the current page when this page is visited or when archive pages for posts in this category are visited, but I cannot get it to work. The code I have modified from header.php is:

    <li class="<?php if (is_home() or is_archive() or is_single() or
    is_paged() or is_search() or is_category('34') or in_category('34'))
    { ?>current_page_item<?php } else { ?>page_item<?php } ?>">
    <a href="<? php echo get_settings('home'); ?>/" title="<?php fauna_info('tab'); ?>"
    accesskey="1"><?php fauna_info('tab'); ?></a></li>

    The entire gallery category archive code can be viewed here and the header.php file can be viewed here.

    I am quite out of my depth with all of this so my thanks to anyone who can shed a bit of light on this for me.

  • The topic ‘difficulties with current page indication in nav menu’ is closed to new replies.