Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • #4261

    Hi! Thank you for the fantastic theme! I do have a small suggestion for a future release of Habitat:

    With the new wordpress menu system (3.0+), you can add a category to your navigation containing all posts in that category. However, the top level navigation that shows an active state for the current page or category doesn’t remain active when viewing child-posts of that parent category.

    For those of you struggling to fix this, here’s what worked for me:

    Assuming you have left the ‘menu_class’ set to ‘nav’ in the header.php file, go to your style.css and find…

    .nav .current-menu-item a strong {

    <–Your styles here for active state nav button or text–>


    and replace with…

    .nav .current-menu-item a strong, .nav .current-post-parent a {

    <–Your styles here for active state nav buttons/tabs/text–>


    Now, all posts linked to, say, “Blog” will keep your “Blog” navigation tab highlighted, even when you are looking at an archive page.

    Hope that helps someone. Really great theme, guys! Thank you.


    Thanks for this tutorial :) – I’ll extend the menu tutorial with your code.

Viewing 2 posts - 1 through 2 (of 2 total)

The topic ‘Active class on category menu item when viewing archive posts (WP 3.0+)’ is closed to new replies.