Wordpress Adding Inline Styles

I have a small question about registering Customizer API / Redux styles.
What is the right method of adding style file to head ?
For example I have test.php file that consist of codes like:

  <?php global $redux_theme_option; ?>
     <style type = 'text/css'>
    h1{color:<?php echo $redux_theme_option["h1_color"];?>

How can i add this file to head with right method?

you can refer here https://codex.wordpress.org/Function_Reference/wp_add_inline_style

1 Like

As @nicethemez said, wp_add_inline_style() is the solution.

Good Luck!

Thanks :slight_smile: