CSS in theme is not working properly
-
I have added php in my wp css file and named it style.php . It is working properly.
<?php
header(“Content-type: text/css”);?>
<?php $background = ‘#555’?>body{
background:<?php echo $background; ?>;
font-family:Helvetica,Arial, sans-serif;
color: #eee;
line-height: 1.5;
}
Problem: But when I have wanted to do such, it does not work.<?php
header(“Content-type: text/css”);?>
<?php $color = $options[‘color_demo’];
echo $color;
?>body{
background:<?php echo $color; ?>;
font-family:Helvetica,Arial, sans-serif;
color: #eee;
line-height: 1.5;
}I noticed that when any external variable is added here then the script is not working.
- The topic ‘CSS in theme is not working properly’ is closed to new replies.