Category.php not displaying category title
-
Hello
Still new to creating my own WP Themes, and I can’t seem to figure this one out…
I’m in my “Category.php” and all I’m trying to figure out is how to display the current category title. (so when you pick different categories, the title will switch) Right now I can not even get it to display… I’m clearly missing something….
Code:
<?php get_header(); ?> <?php get_sidebar(); ?> <div id="body_pages"> <h2><?php single_cat_title(); ?></h2> <?php $posts = query_posts($query_string . '&orderby=title&order=asc'); if (have_posts()) : while (have_posts()) : the_post(); ?> <?php the_content(); ?> <?php endwhile; else: ?> <p><?php _e("Sorry, but there are no GTBC members in this category",""); ?></p> <?php endif; ?> <div id="cat_arch_nav"> <?php if(function_exists('wp_pagenavi')) { wp_pagenavi(); } else { ?> <?php previous_posts_link(__('? PREVIOUS PAGE','')) ?> <?php next_posts_link(__('NEXT PAGE ?','')) ?> <?php } ?> </div><!-- /cat_arch_nav --> </div><!--END body_pages--> <?php get_footer(); ?>
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Category.php not displaying category title’ is closed to new replies.