• The theme K2 can display a list of pages and separate the active viewed page from the rest. Check out what I mean at http://getk2.com/

    This is done by using the following code:

    <ul class="menu">
    			<?php if ('page' != get_option('show_on_front')) { ?>
    			<li class="<?php if ( is_home() or is_archive() or is_single() or is_paged() or is_search() or (function_exists('is_tag') and is_tag()) ) { ?>current_page_item<?php } else { ?>page_item<?php } ?>"><a href="<?php echo get_settings('home'); ?>/" title="<?php echo get_option('k2blogornoblog'); ?>"><?php echo get_option('k2blogornoblog'); ?></a></li>
    			<?php } ?>
    			<?php wp_list_pages('sort_column=menu_order&depth=1&title_li='); ?>
    			<?php wp_register('<li class="admintab">','</li>'); ?>
    		</ul>

    It seems the key line is <?php wp_list_pages('sort_column=menu_order&depth=1&title_li='); ?>

    Instead of listing pages. I want to list categories. I have check out wp_list_cats() which says the php should be wp_list_categories but I cannot get it working.

    By working I mean to display a simple list like on K2 but instead of pages being displayed, categories will be displayed and the active category will be separated from the rest …

    How do I do this?

    Thanks

    Alan

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)

The topic ‘Display Active Viewed Category’ is closed to new replies.