[Resolved] Passing Customizer Settings From A Custom Child Theme

Home Forums Support [Resolved] Passing Customizer Settings From A Custom Child Theme

Home Forums Support Passing Customizer Settings From A Custom Child Theme

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1581075
    codesignwp

    I am working on a wp multisite where all the subsites will use the same theme as in layout, header, footer etc.

    Right now I am exporting the customizer data and importing it manually on each site.

    Is there a way I can automate that process?

    Like passing the customizer settings value form the child theme functions.php

    #1581925
    codesignwp

    I found a solution,

    add_filter('generate_option_defaults', function ($defaults) {
        $defaults['container_width'] = '1500';
        $defaults['layout_setting'] = 'left-sidebar';
    
        return $defaults;
    });

    But it doesn’t work out of the box it works when only I open the customizer in wordpress and save the settings.

    Anyways to completely overwrite the theme-defaults?

    #1581946
    codesignwp

    But it doesn’t work out of the box it works when only I open the customizer in wordpress and save the settings.

    Turn off ‘dynamic_css_cache’

    #1582013
    Tom
    Lead Developer
    Lead Developer

    Glad you got it sorted – thanks for sharing! 🙂

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.