dynamic menu showing multiple "current" (2 posts)

  1. hazniet
    Posted 9 years ago #

    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>
    <!-- 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>
  2. hazniet
    Posted 8 years ago #


Topic Closed

This topic has been closed to new replies.

About this Topic