• How can I show only post’s category on single/category page and hide the rest of it?

    <ul id="menu">
    	<li<?php if(!is_category() && !is_page() && !is_single()) { ?> class="current-home"<?php } ?>><a href="<?php bloginfo('url'); ?>" title="Home"><?php print HOME; ?></a></li>
    	<li class="current-cat"><?php if(!is_home() && !is_page()) { ?><?php wp_list_categories('orderby=NAME&order=ASC&depth=1&hide_empty=1&title_li='); ?><?php } ?></li>
            <li class="current-page"><?php if(!is_home() && !is_single() && !is_category()) { ?><?php wp_list_pages('orderby=NAME&order=ASC&depth=1&title_li='); ?><?php } ?></li>
    </ul>
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘How to show post’s category on single or category pages?’ is closed to new replies.