Title: Category.php that controls certain categories
Last modified: August 18, 2016

---

# Category.php that controls certain categories

 *  Resolved [Akram Taghavi-Burris](https://wordpress.org/support/users/taghaviburris/)
 * (@taghaviburris)
 * [18 years, 10 months ago](https://wordpress.org/support/topic/categoryphp-that-controls-certain-categories/)
 * I am creating a theme where I want several category pages to look alike but not
   all categories.
 * If I style the category.php, then all categories will have these settings.
 * If I style an indvidual page, say category-4.php, then only category 4 will have
   the setting.
 * What I want is only for category 4,5,6 to all look alike, is there a way to do
   this, without having to create 3 template files that are alike, just different
   category names?
 * Please let me know, thanks.

Viewing 2 replies - 1 through 2 (of 2 total)

 *  [Root](https://wordpress.org/support/users/root/)
 * (@root)
 * [18 years, 10 months ago](https://wordpress.org/support/topic/categoryphp-that-controls-certain-categories/#post-596137)
 * Its in the Codex.
 *  Thread Starter [Akram Taghavi-Burris](https://wordpress.org/support/users/taghaviburris/)
 * (@taghaviburris)
 * [18 years, 10 months ago](https://wordpress.org/support/topic/categoryphp-that-controls-certain-categories/#post-596173)
 * Thanks for the info.
 * I found the solution at: [http://codex.wordpress.org/Theme_Development](http://codex.wordpress.org/Theme_Development)
 * In the end I created a category.php page that only has the following in it:
 * <?php
    $post = $wp_query->post; if ( in_category(‘46,47’) ) { include(TEMPLATEPATH.‘/
   works.php’); } else { include(TEMPLATEPATH . ‘/cat.php’); } ?>
 * Then in the works.php I created the look for category 46 and 47, while the cat.
   php is the generic category page.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Category.php that controls certain categories’ is closed to new replies.

 * 2 replies
 * 2 participants
 * Last reply from: [Akram Taghavi-Burris](https://wordpress.org/support/users/taghaviburris/)
 * Last activity: [18 years, 10 months ago](https://wordpress.org/support/topic/categoryphp-that-controls-certain-categories/#post-596173)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
