All theme styles are in style.css file.
Let's say first line looks like:
body {
background-color: #fff;
}
Now, I've created an option in admin panel named body_bg. User types #000 there and I want the value in style.css to change.
How do I achieve that?
The easiest way to me looks like I have to rename style.css to .php, and just do:
<?php header("Content-type: text/css"); ?>
body {
background-color: <?php echo get_option('body_bg');?> ;
}
And then just link style.php in empty style.css file. It's perfectly valid and works, but I've never seen a theme with style.php file, so how do people modify their stylesheets dynamically?