Possible Duplicate:
How can I use WordPress functions in my stylesheet?
I have a file, custom.php, thats basically a stylesheet with php variables for the styles. I used this guide to make it but Im not sure how to use the style sheet in my theme. Here is my /styles/custom.php:
<?php
header("Content-type: text/css");
?>
div{background-color:<?php echo "red" ?>;}
and my functions.php file has this:
$root=get_bloginfo('template_directory');
wp_enqueue_style("custom", $root."/styles/custom.php");
So the custom.php file should be rendered as a stylesheet right? But my wordpress site doesnt load the file contents. When I look at the source code via firebug and expand the custom.php file all I see is:
Reload the page to get source for: http://samsung/wordpress/wp-content/themes/kjd/styles/custom.php?ver=3.4.1
This is on my dev machine running Ubuntu 12.04, LAMP and Wordpress 3.4.1

custom.phpfile a part of you theme? – Rutwick Gangurde Aug 22 '12 at 5:20get_header()function call, which automatically enqueues thestyle.css. If it's not a part of your theme, then why do you need thestyle.csson it? – Rutwick Gangurde Aug 22 '12 at 10:17