Support » Fixing WordPress » customising category pages

  • Is there a step by step guide to customising category pages?

    At the moment they look they same as my index page, but what I’d like to do is have diferent content in each category sidebar for example.

    Is this possible in v.1.5? And if so where do I start?

    Thank you!

Viewing 6 replies - 1 through 6 (of 6 total)
  • Thanks ohdear,

    Could I ask where I put this – is it in index.php?

    And say for example I wanted a different header for category one. Could I create a file called category1header.php, upload it and then add:

    <?php if ((in_category(‘5’))): ?>
    <?php get_category1header(); ?>
    Some more category specific HTML here
    <?php endif; ?>

    Or doesn’t it work like that?

    Sorry if I’m stating the obvious.

    Mmmm – obviously not as simple as that.

    I tried it but got parse errors instead of my web page displayed.

    anyone know how to get category pages that differ from the index page and each other?

    It is a great new feature, but hasn’t been properly documented for newbies as far as I can see.

    What you’re probably best off doing is making a new page for each category (next to the write option)… and then you can make them however you want. See that link about categories for how you’d set up the categories on each page…

    I think for category headers, the easiest option would be to make a file called category.php and place in your current theme folder.

    Then use <?php single_cat_title(); ?> to return the category title for page, e.g <h2><?php single_cat_title(); ?></h2>


    <img src=”<?php bloginfo(‘url’); ?>/img/<?php single_cat_title(); ?>.gif” alt=”<?php single_cat_title(); ?>” />

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘customising category pages’ is closed to new replies.