getting variable set in widget to display in .php style sheet
-
Hi
I have written a drag and drop widget to display in the widgetized areas. The widget collects and saves all of the data that is input perfectly.I have added a style sheet style.php and but no matter what I try I am not getting the variables set in the widget to display in the style sheet.
I have stripped my code down to where it will fetch the php style sheet and add the stylesheet to the head, when I click on it it is displaying the css but blank values.
I know the widget is saving the data / variables in the wp_options table under “widget_text-style-widget”. I have tried all sort of tut I have found on the net but none have worked.
My style.php code is below stripped down, please can someone help me to get it to fetch the variables.
<?php header("Content-type: text/css"); ?>
.text-desc .Arial {
font-family:<?php echo $instance['p_font']; ?>
color:<?php echo $instance['p_color']; ?>
}Thanks for the help
- The topic ‘getting variable set in widget to display in .php style sheet’ is closed to new replies.