148 posts
  • Has been part of the Envato Community for over 2 years
  • Located in Czech Republic
Itachicz says

Hi,

I’m using SMOF framework and I want to make user able to chagne theme colors via color pickers in options panel.

here is my code for it: global $data; if ( is_admin() ) { } else { function custom_styles_method() { wp_enqueue_style('custom_styles', get_template_directory_uri() . '/css/custom_styles.css'); $headings = $data['headings_color']; $custom_css = " h1,h2,h3,h4,h5{ color: $headings; }"; wp_add_inline_style('custom_styles',$custom_css); } add_action('wp_enqueue_style', 'custom_styles_method'); custom_styles_method(); }

but it doesn’t display value from that variable at all, but when I’m trying to echo value in page.php for example it works fine.

Do you have any ideas where could be a problem?

Thx for your time.

148 posts
  • Has been part of the Envato Community for over 2 years
  • Located in Czech Republic
Itachicz says

Problem solved, please close this thread thx :)

by
by
by
by
by
by