Title: Dynamic Stylesheet
Last modified: August 19, 2016

---

# Dynamic Stylesheet

 *  Resolved [buckza](https://wordpress.org/support/users/buckza/)
 * (@buckza)
 * [18 years ago](https://wordpress.org/support/topic/dynamic-stylesheet-1/)
 * I’ve created a dynamic stylesheet and called in style.php
 * I’ve put it in my themes/theme_name directory and deleted the style.css that 
   was in there.
 * Now it looks like it does not pick up the stylesheet at all.
 * Where do I change the name of the stylesheet to style.php and not style.css? 
   I think wordpress is looking for style.css and now can’t find it.
 * Thanks in Advance

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

 *  [Alex Cragg](https://wordpress.org/support/users/epicalex/)
 * (@epicalex)
 * [18 years ago](https://wordpress.org/support/topic/dynamic-stylesheet-1/#post-761859)
 * Did you add this to the top of your style.php?:
    `<?php header("Content-type:
   text/css"); ?>`
 * Also, to make WordPress look for the correct file, open your header up and add
   this
    `<link rel="stylesheet" type="text/css" media="screen" href="style.php"
   >`
 * Hope that works
 * Alex
 *  Thread Starter [buckza](https://wordpress.org/support/users/buckza/)
 * (@buckza)
 * [18 years ago](https://wordpress.org/support/topic/dynamic-stylesheet-1/#post-761866)
 * Thanks for the quick replay back
 * I did add <?php header(“Content-type: text/css”); ?>
    in the top of my style.
   php
 * This is what I have in my header.php
    <link rel=”stylesheet” href=”<?php bloginfo(‘
   stylesheet_url’); ?>” type=”text/css” media=”screen” />
 * How can I change that
    My style.php is in /themes/limau-orange-01/style.php
 *  [Alex Cragg](https://wordpress.org/support/users/epicalex/)
 * (@epicalex)
 * [18 years ago](https://wordpress.org/support/topic/dynamic-stylesheet-1/#post-761869)
 * Simply change
    `<link rel="stylesheet" href="<?php bloginfo('stylesheet_url');?
   >" type="text/css" media="screen" />` to `<link rel="stylesheet" href="http://
   mydomainname.com/wp-content/themes/limau-orange-01/style.php" type="text/css"
   media="screen" />`
 *  Thread Starter [buckza](https://wordpress.org/support/users/buckza/)
 * (@buckza)
 * [18 years ago](https://wordpress.org/support/topic/dynamic-stylesheet-1/#post-761870)
 * thanks
    I did change that but not it looks like the stylesheet is not parsing
   correct
 * This is what I have in style.php
 * <?php header(‘Content-type: text/css’); ?>
 * /* Setup the Variables */
    $pagewidth = ‘980px’ /* Width of the Page */ $gutter
   = ‘5px’ /* Gutter Sise */ $leftwidth = ‘200px’ /* Left Width */ $rightwidth =‘
   170px’ /* Right Width */
 * $fontsizeglobal = ’12px’ /* Global Font Size */
    $fontsizeh1 = ’24px’ /* H1 Font
   Size */ $fontsizeh2 = ’16px’ /* H2 Font Size */ $fontsizeu1 = ’13px’ /* U1 Font
   Size */
 * $fontcolor1 = ‘#666’ /* #666 Grey */
    $fontcolor2 = ‘#000’ /* #000 Black */ $
   fontcolor3 = ‘white’ /* #FFF white */
 * body {
    font-family:’Verdana’; font-size:<? $fontsizeglobal ?>; }
 * and this is the output I get when I run it in a browser
    /* Setup the Variables*/
   $pagewidth = ‘980px’ /* Width of the Page */ $gutter = ‘5px’ /* Gutter Sise */
   $leftwidth = ‘200px’ /* Left Width */ $rightwidth = ‘170px’ /* Right Width */
 * $fontsizeglobal = ’12px’ /* Global Font Size */
    $fontsizeh1 = ’14px’ /* H1 Font
   Size */ $fontsizeh2 = ’16px’ /* H2 Font Size */ $fontsizeu1 = ’13px’ /* U1 Font
   Size */
 * $fontcolor1 = ‘#666’ /* #666 Grey */
    $fontcolor2 = ‘#000’ /* #000 Black */ $
   fontcolor3 = ‘white’ /* #FFF white */
 * body {
    font-family:’Verdana’; font-size:; }
 * the fontsize is blank where the code to generate that is
    font-size:<? $fontsizeglobal?
   >;
 * what am I missing?
 *  Thread Starter [buckza](https://wordpress.org/support/users/buckza/)
 * (@buckza)
 * [18 years ago](https://wordpress.org/support/topic/dynamic-stylesheet-1/#post-761871)
 * I found my mistake after browsing the PHP sites
    thanks again – all working now
 *  [kidino](https://wordpress.org/support/users/kidino/)
 * (@kidino)
 * [17 years, 2 months ago](https://wordpress.org/support/topic/dynamic-stylesheet-1/#post-762373)
 * Maybe it should be…
 * `<link rel="stylesheet" href="<?php bloginfo('template_directory'); ?>/style.
   php" type="text/css" media="screen" />`
 * Just wondering…

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

The topic ‘Dynamic Stylesheet’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 6 replies
 * 3 participants
 * Last reply from: [kidino](https://wordpress.org/support/users/kidino/)
 * Last activity: [17 years, 2 months ago](https://wordpress.org/support/topic/dynamic-stylesheet-1/#post-762373)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
