Dynamic Stylesheet and get_theme_mod() error
-
I’m having an issue while trying to use a dynamic stylesheet, mystyle.css.php, getting the error “Fatal error: Call to undefined function get_theme_mod()”
I registered and enqueued the the stylesheet in my functions.php file, as follows:
wp_register_style('mystyle', get_template_directory_uri() . '/bc-parts/mystyle.css.php'); wp_enqueue_style('mystyle', get_template_directory_uri() . '/bc-parts/mystyle.css.php');
And this is the stylesheet:
<?php header('Content-type: text/css'); ?> a:link, a:visited:link { color: <?php echo get_theme_mod(site_title_color);?>;
I’m using WordPress Customizer with Kirky plugin. My objective is to use a dynamic stylesheet rather than having all the generated styles output to the head of the theme.
What am I missing?
Thanks ??
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘Dynamic Stylesheet and get_theme_mod() error’ is closed to new replies.