Title: CSS style swticher script
Last modified: August 19, 2016

---

# CSS style swticher script

 *  [snocaps](https://wordpress.org/support/users/snocaps/)
 * (@snocaps)
 * [15 years, 7 months ago](https://wordpress.org/support/topic/css-style-swticher-script/)
 * I’m new to WordPress and am trying to figure out how to add this [PHP switcher from A List Apart](http://www.alistapart.com/articles/phpswitch/).
 * My question is how do I add this snippet to the head tag for every page?
 *     ```
       <link rel="stylesheet" type="text/css"
       	media="screen" title="User
       Defined Style" href="<?php echo
       (!$sitestyle)?'defaultstyle':$sitestyle ?>.css" />
       ```
   

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

 *  [William](https://wordpress.org/support/users/daniel_ac/)
 * (@daniel_ac)
 * [15 years, 7 months ago](https://wordpress.org/support/topic/css-style-swticher-script/#post-1744404)
 * Under your themes folder, there should be either a header.php or the main default
   file (I can’t recall the name of it at the moment). In that file, you’ll find
   the html “head” tag. I’d stick it in there.
 *  Thread Starter [snocaps](https://wordpress.org/support/users/snocaps/)
 * (@snocaps)
 * [15 years, 7 months ago](https://wordpress.org/support/topic/css-style-swticher-script/#post-1744448)
 * Thanks William.
 * There’s two header.php files I found.
 * …/wp-content/themes/mytheme/header.php
    …/wp-includes/theme-compat/header.php
 * Do they both have to be changed?
 * Perhaps someone else could confirm William’s tip, before I go wrecking stuff.
 *  [Joseph](https://wordpress.org/support/users/jpe24524/)
 * (@jpe24524)
 * [15 years, 7 months ago](https://wordpress.org/support/topic/css-style-swticher-script/#post-1744469)
 * In `/wp-content/themes/mytheme/header.php`.
 *  Thread Starter [snocaps](https://wordpress.org/support/users/snocaps/)
 * (@snocaps)
 * [15 years, 7 months ago](https://wordpress.org/support/topic/css-style-swticher-script/#post-1744480)
 * Thanks Joseph.
 * Ended up with a “Document Moved” error, the article is 8 years old so I’m going
   to try a find another solution. Looks like there was a plugin for something like
   this but it’s deprecated now.

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

The topic ‘CSS style swticher script’ is closed to new replies.

 * In: [Hacks](https://wordpress.org/support/forum/plugins-and-hacks/hacks/)
 * 4 replies
 * 3 participants
 * Last reply from: [snocaps](https://wordpress.org/support/users/snocaps/)
 * Last activity: [15 years, 7 months ago](https://wordpress.org/support/topic/css-style-swticher-script/#post-1744480)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
