I would love to integrate Custom CSS field from my Option Tree plugin to the code, but if I try to integrate them following way into functions.php
, it ends up with Fatal error: Call to undefined function ot_get_option() in /data/web/virtuals/51889/virtual/www/domains/demo.kybernaut.cz/ommo-wp/wp-content/themes/ommo/functions.php on line 36 So it looks like that I call the function before loading ot_get_option
function from Option tree, is that possible? What to do with it? Thanks a lot!
//Custom CSS
if (ot_get_option('css', false) != false) {
function css() {
return '<style>'.ot_get_option('css').'</style>';
}
add_action( 'wp_head', 'css', 100 );
}
css
is an incredibly generic function name, it's going to cause issues for you further down the line, consider adding a prefix or namespace