Forums

Category Navigation instead of Pages (2 posts)

  1. stoo31
    Member
    Posted 3 years ago #

    <div id="navbg">
    <div id="nav">
    <ul>
    <li class="<?php if (((is_home()) && !(is_paged())) or (is_archive()) or (is_single()) or (is_paged()) or (is_search())) { ?>current_page_item<?php } else { ?>page_item<?php } ?>"><a href="<?php echo get_settings('home'); ?>">Home<?php echo $langblog;?></a></li>
    <?php wp_list_pages('sort_column=menu_order&depth=1&title_li='); ?>
    <li class="rss"><a href="<?php bloginfo('rss2_url'); ?>">RSS</a></li>
    </ul>
    </div>

    I have tried various ways so that this displays and highlights the selected category that is being displayed, but it will display the categories so they are selectable but not highlight them in the menu.

    If someone could change that code for me would be much appreciated.

  2. Evita
    Member
    Posted 3 years ago #

    I think, current categories have the class .current-cat by default. So put .current-cat {YOURSTYLE} (or #nav .current-cat {YOURSTYLE}) in your stylesheet and it should work.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags