WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I was wondering if and how is it possible in Wordpress to set a different theme for a specific category of contents (in my case the blog).

I'm on WP 3.3.1.

Thank you so much in advance.

Any help will be sincerely appreciated.

share|improve this question

migrated from stackoverflow.com Mar 6 '12 at 15:26

This question came from our site for professional and enthusiast programmers.

WordPress can only use one Theme at a time. You cannot (and, really, should not) change Themes on-the-fly. (There are edge cases; search the Plugin repository for Theme Switcher Plugins for implementation examples.)

That said, that doesn't mean that a single Theme can't output different styles based on the current context; and, really, that's what you're after here.

The first step is understanding the Template Hierarchy; in your case, you're primarily interested in Category templates. The primary takeaway here is that you can use specific template files for specific category contexts; i.e. you can define a category-foobar.php template file to output the Foobar category archive index.

The second step is understanding the body_class() template tag, and the context-specific CSS classes that this tag adds to the HTML <body> tag. The primary takeaway here is that WordPress will add category-specific CSS classes to the HTML <body> tag for specific category contexts; i.e. WordPress will add category and category-foobar as classes on the Foobar category archive index, which you can target via CSS with e.g. body.category-foobar.

The rest becomes a matter of HTML and CSS, which is best left as an exercise for the reader.

share|improve this answer

You can either get into http://codex.wordpress.org/Category_Templates Category Templates or use a plugin http://wordpress.org/extend/plugins/gys-themed-categories-2/

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.