Title: Problem changing style.css to style.php
Last modified: August 20, 2016

---

# Problem changing style.css to style.php

 *  [Bruce](https://wordpress.org/support/users/bnowthen/)
 * (@bnowthen)
 * [14 years, 9 months ago](https://wordpress.org/support/topic/problem-changing-stylecss-to-stylephp/)
 * I changed the name of the style.css file to style.php both in my Twentyten theme
   folder and my Twentyten-child folder. I added this line of code to each:
 * > <?php header(“Content-type: text/css”); ?>
 * I also changed the header.php file to read this:
 * > <link rel=”stylesheet” type=”text/css” media=”all” href=”<?php bloginfo( ‘template_directory’);?
   > >/style.php” />
 * Now my site seems to be reading the style.php in the Twentyten folder, but not
   the one in the Twentyten-child folder.
 * What to do?
 * Bruce

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

 *  [Tom Lynch](https://wordpress.org/support/users/ctsttom/)
 * (@ctsttom)
 * [14 years, 9 months ago](https://wordpress.org/support/topic/problem-changing-stylecss-to-stylephp/#post-2254971)
 * WordPress I believe requires that the stylesheet be style.css and won’t work 
   otherwise, why are you making it a php file?
 *  Thread Starter [Bruce](https://wordpress.org/support/users/bnowthen/)
 * (@bnowthen)
 * [14 years, 9 months ago](https://wordpress.org/support/topic/problem-changing-stylecss-to-stylephp/#post-2255029)
 * Yes, WordPress requires the stylesheet to have have a .css extension, but you
   get get around that if you want to have your .css accept variables. Here are 
   a couple of links that show how and give a couple of examples.
    [http://www.barelyfitz.com/projects/csscolor/](http://www.barelyfitz.com/projects/csscolor/)
   [http://thejimgaudet.com/articles/dynamic-css-changing-style-css-to-style-php/](http://thejimgaudet.com/articles/dynamic-css-changing-style-css-to-style-php/)
 * I want to dynamically change the display value of a paragraph using a Jquery 
   routine so that every time my php code on my WordPress page loops through rows
   of the database and display the data, particular paragraphs have a display mode
   of none, but can be opened with Jquery .slidedown and then closed with Jquery.
   slideup. This requires that with each loop, the paragraph and triggering span
   have a new id which I will change by adding a -0 to the variable name and add
   1 to it with each loop.
 * There are other ways to do it, but this seems like the simplest. But then what
   do I know? I’m learning this as I go.
 * Bruce

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

The topic ‘Problem changing style.css to style.php’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 2 replies
 * 2 participants
 * Last reply from: [Bruce](https://wordpress.org/support/users/bnowthen/)
 * Last activity: [14 years, 9 months ago](https://wordpress.org/support/topic/problem-changing-stylecss-to-stylephp/#post-2255029)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
