How to show category name instead of latest post name
-
I have a few different category pages and when I load them, the title shows up as the same as the name of the latest post in that category. I need titles to show up on pages but category names to show up on all category pages. Here is a sample of the code:
<?php if(!is_front_page()):?> <div id="main"> <section class="main-holder"> <?php if(is_home()):?> <header class="heading"> <h1><?php _e('The RICS Blog','ricssoftware');?></h1> <p><?php _e('The latest news & articles from RICS Software','ricssoftware');?></p> </header> <?php else:?> <header class="heading"> <h1><?php the_title();?></h1> <?php if ( get_post_meta(get_the_ID(), 'page_descript', true) ) : ?> <p><?php echo get_post_meta(get_the_ID(), 'page_descript', true) ?></p> <?php endif;?> </header> <?php endif;?> <?php endif;?>
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘How to show category name instead of latest post name’ is closed to new replies.