laptopmemo
Member
Posted 2 years ago #
What I'm trying to figure out to do is add the category title to each category page.
Say you go to the "Leaks" category, right now you don't see the words "Leaks" above all of the posts in that category. I'd like to add that PHP string to my iBlog2 template so it can be easier for users to browse the site.
my blog is LaptopMemo.com
this is a corresponding area from the default theme's archive.php:
<?php /* If this is a category archive */ if (is_category()) { ?>
<h2 class="pagetitle">Archive for the ‘<?php single_cat_title(); ?>’ Category</h2>
http://codex.wordpress.org/Template_Tags/single_cat_title
<?php single_cat_title(); ?> will echo the category title.
obviously, add this to category.php (or archive.php).
btw: the default theme is always a useful source of inspiration, to find out 'how it is done'
laptopmemo
Member
Posted 2 years ago #
Thanks but I don't have a category.php file. From what I know of, copying the index.php file and calling it category.php is enough, right? And I do have an archive.php, but would thay show any changes in categories?