Title: Same code &#8211; different css
Last modified: August 18, 2016

---

# Same code – different css

 *  [pizzaman](https://wordpress.org/support/users/pizzaman/)
 * (@pizzaman)
 * [20 years, 6 months ago](https://wordpress.org/support/topic/same-code-different-css/)
 * Can’t seem to find a how-to on this.
 * I have 4 themes. All use the exact same php files but different css. How would
   I set up WP to use the same code with 4 different css files?
 * As it stands now, every time I make a code change I have to upload 4 files – 
   one in each theme’s dir.

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

 *  [TechGnome](https://wordpress.org/support/users/techgnome/)
 * (@techgnome)
 * [20 years, 6 months ago](https://wordpress.org/support/topic/same-code-different-css/#post-290395)
 * Yuuup…. that’s the way it works.
 * -tg
 *  [moshu](https://wordpress.org/support/users/moshu/)
 * (@moshu)
 * [20 years, 6 months ago](https://wordpress.org/support/topic/same-code-different-css/#post-290396)
 * That’s easy.
    Keep one as the “main” theme and delete all the files except the
   style.css from the other 3. (Of course, if they have different images in an image
   folder and referred to from the stylesheet, keep the images, too!) Let’s say,
   the main theme will be called “alpha”. At the top of the remaining 3 stylesheets
   put this: `/*  Template: alpha Theme Name: The Second Variant Description: whatever
   Author: your... etc. and the Third and the Fourth and so on.
 *  Thread Starter [pizzaman](https://wordpress.org/support/users/pizzaman/)
 * (@pizzaman)
 * [20 years, 6 months ago](https://wordpress.org/support/topic/same-code-different-css/#post-290402)
 * Thanks Moshu.
 * Is it the header in the stylesheet that makes this work?
    Currently I have “Theme
   Name” and the rest but no “Template”.
 *  [moshu](https://wordpress.org/support/users/moshu/)
 * (@moshu)
 * [20 years, 6 months ago](https://wordpress.org/support/topic/same-code-different-css/#post-290406)
 * Yes, add that line with the Template.
 *  Thread Starter [pizzaman](https://wordpress.org/support/users/pizzaman/)
 * (@pizzaman)
 * [20 years, 6 months ago](https://wordpress.org/support/topic/same-code-different-css/#post-290507)
 * Finally got a chance to try the above.
 * The “main” theme and one other show up in admin. Admin says that the other two
   are “installed but incomplete. All themes must have a template.”
 * Here’s what I have:
 * Main theme css header:
    /* Theme Name: Main Theme Description: Blah… etc..
 * 2nd theme css header:
    /* Template: Main Name Theme Name: Name #1 Description:
   Blah… etc…
 * 3rd theme css header:
    /* Template: Main Name Theme Name: Name #2 Description:
   Blah… etc…
 * 4th theme css header:
    /* Template: Main Name Theme Name: Name #3 Description:
   Blah… etc…
 * Does the Theme Name line HAVE to say “The Second Variant?”
 *  Thread Starter [pizzaman](https://wordpress.org/support/users/pizzaman/)
 * (@pizzaman)
 * [20 years, 6 months ago](https://wordpress.org/support/topic/same-code-different-css/#post-290509)
 * Wait. I left a colon out of the one other theme that was showing up. Now all 
   three of the “template” theme are marked as broken. Admin says that they must
   have a stylesheet and a template. I’m confused. Could it be because I haven’t
   deleted all the php files from the other three dirs?
 *  Thread Starter [pizzaman](https://wordpress.org/support/users/pizzaman/)
 * (@pizzaman)
 * [20 years, 6 months ago](https://wordpress.org/support/topic/same-code-different-css/#post-290516)
 * Got it all figured out – finally.
 * The child theme must have the name of the parent theme’s directory in the “Template:
   xxxx” part of the css header.
    I was using the parent theme’s name.
 * Thanks again moshu for pointing me in the right direction.

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

The topic ‘Same code – different css’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 7 replies
 * 3 participants
 * Last reply from: [pizzaman](https://wordpress.org/support/users/pizzaman/)
 * Last activity: [20 years, 6 months ago](https://wordpress.org/support/topic/same-code-different-css/#post-290516)
 * Status: not a support question

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
