Show category title, description and posts on single.php page – simple? no!
-
This seems like the most simple task but after searching for the last 40 minutes I cannot find a way to do this!!
All I would like to do is show the title / description / and posts of the current category when on the single.php and viewing a post.
On the category page (archive.php) it was easy!
<!-- category-title --> <?php if (is_category()) { single_cat_title(); } ?> <!-- category-summary --> <?php echo category_description($category); ?> <!-- category-posts --> <?php while (have_posts()) : the_post(); ?> <a href="<?php the_permalink() ?>"><?php the_title(); ?></a> <?php endwhile; ?>
Even if I altered the title request to say if(is_single) and use that same code on the single.php it returns nothing.
Viewing 12 replies - 1 through 12 (of 12 total)
Viewing 12 replies - 1 through 12 (of 12 total)
- The topic ‘Show category title, description and posts on single.php page – simple? no!’ is closed to new replies.