The idea is this, working with WordPress multisite, using single theme. Its completely built from the ground up and and does everything I want expert one thing, I can’t change accent colors that are controlled by the stylesheet PHP acting as a CSS from my theme options.

I can call on the theme options data by using

<?php echo of_get_option('themecolor', 'no entry'); ?>

And in my global.php which is my stylesheet file I have

<?php header("Content-type: text/css");
$theme_color = $_GET['themecolor'];

where theme_color is placed like this

<?php echo $theme_color; ?>

My functions code for the style she looks like this

   function my_styles(){

   of_get_option('themecolor', 'no entry');
   wp_register_style('mys', get_template_directory_uri() . '/css/global.php?themecolor', array(), time(), 'all');
   wp_enqueue_style('mys'); // Enqueue it!


As you can see I am trying what ever I can think off to get that data to change and none of it works.

Is there anyway to get that option data to change the global.php data?

Read more here: Change PHP acting as CSS Variables Via Options.php in WordPress


If you know the solution of this issue, please leave us a reply in Comment section, to update the question.

Wordpress related questions and answers: