• I have my dynamic menus working, they are just working too well. My link structure is: home, category, category, etc.

    At the home page the home link is highlighted, great. The problem is that the category of the most recent post is also highlighted. I’m not sure why it is doing this. This problem only occurs on the home page. Here is my code for the links:

    <!-- To show "current" on the home page -->
    <li<?php if (is_home()) { echo " class=\"current\""; }?>>
    <a href="<?php bloginfo('url') ?>/">Home</a>
    </li>
    
    <!-- To show "current" on any posts in category 10, called Adjudications -->
    <li<?php if (is_category('adjudications') || in_category('10') && !is_single()) { echo " class=\"current\""; }?>>
    <a href="<?php bloginfo('url') ?>/adjudications">Adjudications</a>
    </li>
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘dynamic menu showing multiple “current”’ is closed to new replies.