Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

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.

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

Thanks

share|improve this question

1 Answer 1

up vote 3 down vote accepted

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.

share|improve this answer
    
Thankyou........ :) –  Giri Feb 10 '12 at 15:50

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.