Skip to content
  • Home
  • Fussy Vegetarian
  • Email Newsletter
Copyright Being Manan 2026
Theme by ThemeinProgress
Proudly powered by WordPress
  • Home
  • Fussy Vegetarian
  • Email Newsletter
Being MananManan reviews tech and gadgets
  • You are here :
  • Home
  • Computing & Internet
  • WordPress Category Page Tweaks
Computing & Internet

WordPress Category Page Tweaks

April 20, 2008

Editing your category page to make it look better:

This tut/hack explains how to:

  • Show Category Title on top of each category page.
  • Show Category Description below the Category Title on each category page.
  • Show only a bulleted list of Post Titles in the corresponding category.
  • Format the titles via style.css.

1. If your theme does not have a category.php page, copy singlepost.php and rename it to category.php

2. Show Only Post Title:

Inorder to show only title of your posts on the category page, remove the following code:

<div class=”post”>

<?php the_content(‘Read the rest of this entry »’); ?>

</div>

Alternately if you wish to show only excerpts then change

the_content(‘Read the rest of this entry »’)

to

the_excerpt()

3. Remove Post Footer Options:

To remove the footer options – comments, posted in etc., then remove the following:

<div class=”post-footer”>Posted in <?php the_category(‘, ‘) ?> <strong>|</strong> <?php edit_post_link(‘Edit’,”,'<strong>|</strong>’); ?> <?php comments_popup_link(‘No Comments »’, ‘1 Comment »’, ‘% Comments »’); ?></div>

4. To make post titles appear as a list with bullets:

Add

<ul> (for theme based bullets) and <li>

and close these tags after the following, making it look like this:

<ul><li><h8 class=”post-title”><a href=”<?php the_permalink() ?>” rel=”bookmark” title=”Permanent Link to <?php the_title(); ?>”><?php the_title(); ?></a></h8>
<p>Posted on: <?php the_date(); ?>; <?php the_time(); ?></p></li></ul>

5. Format Header via style.css:

Define a new header font style in style.css according to your preferences:

  1. Open style.css
  2. Under headings (you will find a lot of h1, h2 etc. add a new parameter say h8, I have used h8.
  3. Find the following in style.css:

h3 { font-size: 24px; }

h4, h5, h6 { font-size: 20px; }

h7 { margin-left: 70px; }

and add this below it:

h8 { font-size: 16px; font-weight: normal; }

you can change it as per your wishes.

6. To show Category title on each category page:

find:

<div id=”wrapper”>

<div id=”content-wrapper”>

add below:

<p><h9>Category: <?php single_cat_title(); ?></h9></p>

as you see I have added a new header parameter h9 for the titles shown on the category page

The properties for h9 in my style.css are:

h9 { font-size: 17.5px; margin-left: 20px; color: #5186b1; }

8. To show category description below the title on each category page:

find:

Category: <?php single_cat_title(); ?>

add below:

<p><?php echo category_description(single_cat_title()); ?></p>

the ‘p’ tag is for paragraph formatting.

Thank you for reading, all the best.

You may also like

Transitioning to Unifi for WiFi: The Expensive Lessons Learned

2025 Subscriptions Review

Walkthrough of my Homelab

Firewalla: A home firewall that everyone can use

Desk Cable Management: Master Guide for a Functional Desk

One Dock to Power the Work from Home Setup

Related

Tags: beautify, Blogging Tips & Tricks, category, wordpress

8 comments

  • Rachelle has written: April 30, 2008 at 3:33 pm Reply

    I’ve been trying to add category descriptions in 2.51 and despite following the codex and your guide here. My descriptions will not display in the category page. My default theme DOES work Here is my code from archive.php
    Archive for the ‘?php single_cat_title(); ?>’ Category
    php echo category_description(single_cat_title());

    My question is, what else do I have to do in my theme to enable this description?

  • manan has written: April 30, 2008 at 3:42 pm Reply

    Hi Rachelle,

    I too am on 2.5.1 and it seems to be working fine on my blog. However I would like to ask you as to why are using your archive page? If you intend to display the category description on the category page, you will need to edit the category.php page :)

  • BillyG has written: May 27, 2008 at 4:51 am Reply

    Do you know if there is a way to display a list of posts titles with their excerpts (which you already mentioned separately), even though I have the Reading option set to only display one post at a time?

    So it would be one post displayed from the main page, but a list of X amount on the category pages.

    I left a request with a later bump in the WP forum, but still haven’t gotten any responses. TIA.

  • manan has written: May 27, 2008 at 11:08 am Reply

    No, there is no way of doing that, atleast not known to me. Category pages show the same number of posts as shown on the Index page. Though I would suggest you use the Home Page Excerpts plugin, it will show the latest post in full & excerpts of later entries on the Index page & will show the same number of posts on the Category pages.

  • Billy Girlardo has written: May 29, 2008 at 1:15 am Reply

    Thanks for the confirm. I’d heard of the excerpt before, but now you’ve actually piqued my interest to try it out.

    Thanks, I appreciate it.

  • manan has written: May 29, 2008 at 3:17 am Reply

    No problemo :) Glad to be of assistance.

  • Alek has written: December 30, 2008 at 5:02 pm Reply

    Hi. Good site.

  • Bill Bartmann has written: September 4, 2009 at 2:03 am Reply

    Excellent site, keep up the good work

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Me

Hi, I’m Manan and here I write about gadgets and technology. Find me on Twitter or Mastodon and my stream on Twitch. Get updates over email. Or sign up for the Newsletter.

Ad

Ad

Apps by Manan

Kryton Labs Logo Kryton Labs

Copyright Being Manan 2026 | Privacy Policy | Terms of Service | Theme by ThemeinProgress