Bulk theme settings in wordpress multisite

I have a multisite with 500+ subsites.

I would like to install the same theme in all 500+ sites. Most of them requires configuration like selecting sidebar(left/right), Selecting primary menu etc.

Read More

Is there any plugin available to do this job?
OR
Can anyone give me some idea?

Thanks

Related posts

Leave a Reply

1 comment

  1. If you configure your Theme settings code properly, the Theme will work fine without having any user-defined settings.

    The key is to define a defaults array, and anytime you need to output a Theme option, run an array_merge() on the defaults array, and the theme’s options DB entry. Something like this:

    <?php
    global $mytheme_options;
    $mytheme_options = mytheme_get_options();
    
    function mytheme_get_options() {
        // Defaults array, defined elsewhere
        $option_defaults = mytheme_get_option_defaults();
        // Return parsed args
        $options = wp_parse_args( get_option( 'theme_mytheme_options', array() ), $option_defaults );
    }
    ?>
    

    Then you only ever use the globalized $mytheme_options, which will always contain either the default option, or the user-defined option, if defined.