Support » Themes and Templates » Add Category Title Above Content On Each Page(s)

  • 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

Viewing 3 replies - 1 through 3 (of 3 total)
  • Michael


    Forum Moderator

    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>
    <?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’

    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?



    Forum Moderator

    this might answer yuor question:

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Add Category Title Above Content On Each Page(s)’ is closed to new replies.