Category specific themes?

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?

Read More

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.

Thanks!

Related posts

Leave a Reply

2 comments

  1. 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.

    Example.

    get_header();
    

    Becomes.

    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.
    http://codex.wordpress.org/Function_Reference/get_header
    http://codex.wordpress.org/Function_Reference/get_footer

    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).