Unyson
Unyson copied to clipboard
How to include style.php?
Hi, i need to include "style.php" and get varriable from customizer. I connected "style.php", but when i'm trying to get varriable: "$first_color = fw_get_db_customizer_option('bg-color-1');", i have an error: "Fatal error: Call to undefined function fw_get_db_customizer_option()". How can i fix it? Thank you!
I gave you a solution here: https://github.com/ThemeFuse/Unyson/issues/3443 It is working I tested:
function _action_theme_after_setup_theme() {
include(get_template_directory() . '/test.php');
}
add_action( 'after_setup_theme', '_action_theme_after_setup_theme', 11 );
File test.php code:
<?php
$first_color = fw_get_db_customizer_option('bg-color-1', 'test');
fw_print($first_color);
@ViorelEremia Thank you!
@ViorelEremia How can I include this varriable to css?