Is here anyone use titan framework? I have got a problem for getting option value and save option.
I am trying to create a logo image uploader option but can not get the value as well as not save the valu.
here is my code:
add_action( 'after_setup_theme', 'logo_func' );
function logo_func() {
$titan = TitanFramework::getInstance( 'prospectwizard' );
$logoValue = $titan->getOption( 'theme_logo' );
}
how i call the for getting option value
add_action( 'after_setup_theme', 'logo_func' );
function logo_func() {
$titan = TitanFramework::getInstance( 'prospectwizard' );
$logoValue = $titan->getOption( 'theme_logo' );
}
You are not returning anything in your function, understandable as the tutorials on the Titan site are far too basic.
You should be getting the options value like this (from the code you posted):
And really it should be like this to be more universal:
Then you can use
read_option('logo_func')
orread_option('NAME_OF_OPTION')
anywhere in your theme 🙂Try the tutorials here instead, should answer all your questions:
[http://freshwebdev.com/save-read-option-wordpress-titan-framework.html%5D%5B1%5D
[1]: http://freshwebdev.com/save-read-option-wordpress-titan-framework.html including saving options correctly