My client wants to implement a special appearance to each of our category pages. Kind of like child themes... she wants to shift the background image, change a few graphics, and tweak the colors according to which category the user is visiting (horror, romance, etc).

Is there a reasonable way to do this besides creating a different template for each page with imported CSS styles? Or is that really the only path to accomplish this?

UPDATE: The answers below are all great. For our purposes, the easiest thing to do was to use the category specific classes provided by "body_class()" to override current styles.


  • If you came up with solution other than covered in answers, please add it as answer and not as part of question. Better for organization and voting. :)
    – Rarst
    Commented Feb 4, 2011 at 6:34

2 Answers 2


If changes do not require modifications to HTML markup you can accomplish that by loading conditionally additional CSS style files. See Conditional Tags > A Category Page and wp_enqueue_style() in Codex.


The bulk of your theme is made up of three files, header.php, footer.php and style.css.

If you want to load an alternative header, footer and/or stylesheet simply update the appropriate calls inside the category template(category.php) to pull in a different header/footer/stylesheet.




get_header( 'cat' );

Would then include header-cat.php instead of header.php.
You can do the same with the get_footer() call to include a different footer file.

Using alternate header/footer files is covered on the Codex pages.

For the stylesheet, simply change this(in your new header file).

<link rel="stylesheet" type="text/css" media="all" href="<?php bloginfo( 'stylesheet_url' ); ?>" />

For something like..

<link rel="stylesheet" type="text/css" media="all" href="<?php bloginfo( 'stylesheet_directory' ); ?>/style2.css" />

Or alternatively, use wp_enqueue_style as suggested in the other answer.

Completely custom HTML and CSS without effecting any other kinds of pages(and no changes needed to the existing header/footer/stylesheet).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.