This topic has 6 replies, 3 voices, and was last updated 7 years by Radu.

  • Author
  • #150623
     Rocla
    Participant

    Hi,

    I would like to know if it’s possible to import/set options with PHP code? like add_action or something. I know the option to import the options from within WordPress GUI. I would like to automatize it.

    I have an installation theme, and I would like to pre-configure Kleo Theme for the right colors, header customization etc.

    Thank you, best regards,

    Romain

    #150827
     Laura
    Moderator

    Hello, will assign the ticket to a higher support level who can help and advise you in your query.
    Thanks! ?

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    Laura Solanes - Graphic Designer and Web Designer

    Please be patient as I try to answer each topic as fast as i can.

    If you like the theme or the support you've received please consider leaving us a review on Themeforest!

    Always happy to help you 🙂

    #150926
     Radu
    Moderator

    You can use the import/export functions from theme options

    Cheers
    R

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
    #150929
     Rocla
    Participant

    I know the option to import the options from within WordPress GUI. I would like to automatize it.

    #150949
     Radu
    Moderator

    I see,

    Use this function

    COPY CODE
    
    
    function my_theme_options_php() {
    	$serializedthemedata = '';
    	$aaa = json_decode($serializedthemedata);
    	update_option("kleo_" . KLEO_DOMAIN, $aaa);	
    }
    
    add_action('after_theme_setup', 'my_theme_options_php');
    

    Cheers
    R.

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
    #150953
     Rocla
    Participant

    Thank you!

    #150956
     Radu
    Moderator

    You’re welcome

    Cheers
    R.

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
Viewing 7 posts - 1 through 7 (of 7 total)

You must be logged in to reply to this topic.

Log in with your credentials

Forgot your details?