Support » Networking WordPress » Change default theme

  • Resolved w1nk5

    (@w1nk5)


    How can you change the default theme that is automatically selected for newly created sites. I tried turning off the twenty ten theme in the Network Themes options but it is still selected as the theme for all newly created sites and requires the user to change the theme manually. Once the desired theme is selected. Twenty Ten disappears. Should I just delete the twenty ten theme or will it be replaced during an update recreating this issue?

Viewing 14 replies - 1 through 14 (of 14 total)
  • Andrea Rennick

    (@andrea_r)

    Customer Care at Copyblogger Media and Studiopress

    Do not delete the theme, please. Yes it will be replaced on upgrade, and no havign a different theme there will not automatically select it.

    Do this:
    http://wpmututorials.com/how-to/change-the-default-theme-for-sites-without-a-plugin/

    This is not working for me. Does it work for making a child theme a default?

    // Change default theme
    define(‘WP_DEFAULT_THEME’, ‘dccstore’);

    Where ‘dccstore’ is the folder name housing the child theme. It simply creates the new site with no theme selected.

    Andrea Rennick

    (@andrea_r)

    Customer Care at Copyblogger Media and Studiopress

    A link to your site would reeeeeally help.

    It’s only on my development machine right now. 🙁

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    Lead Plugin Wrangler

    No special funky capitalization?

    Not sure what you mean by funky capitalization?

    I’ve tried:

    define(‘WP_DEFAULT_THEME’, ‘dccstore’);
    define(‘wp_default_theme’, ‘dccstore’);
    define(‘WP_DEFAULT_THEME’, ‘DCCSTORE’);

    Nothing works.

    define(‘WP_DEFAULT_THEME’, ‘dcc’); works like a charm with the parent theme but I cannot get it to work with the child theme!! 🙁

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    Lead Plugin Wrangler

    I mean, in the folder listing, are you using dccStore or something for the folder name? Unix is case sensitive you see 🙂

    negative… the folder is literally ‘dccstore’

    I did find this article: http://www.chriswiegman.com/2010/09/changing-the-default-theme-on-wordpress-3-multi-site/comment-page-1/#comment-496

    However, creating that default-themes.php file and putting it in the mu-plugins folder (I had to create) didn’t help.

    I’m stumped.

    Andrea Rennick

    (@andrea_r)

    Customer Care at Copyblogger Media and Studiopress

    http://wordpress.org/extend/plugins/wpmu-new-blog-defaults/

    try this plugin. Yes, it could be becasue the theme is a child theme. (tho that would be weird)

    That plugin worked! Thanks Andrea. 🙂

    Here is one more way change default theme, just add this code in functions.php of your theme:

    function change_default_theme($blog_id) {
    switch_to_blog($blog_id);
    switch_theme(‘yourTheme’, ‘yourTheme’);
    update_option(‘current_theme’, ”);
    restore_current_blog();
    }
    add_action(‘wpmu_new_blog’, ‘change_default_theme’, 100, 1);

    Andrea Rennick

    (@andrea_r)

    Customer Care at Copyblogger Media and Studiopress

    just add this code in functions.php of your theme:

    If it’s not the active theme, the code will never run. If you mean put it in the main theme folder… that’s nowhere near best practice and likely to cause issues..

    And why use more code to accomplish the same thing? you could use the above code in the mu-plugins folder, once and very quickly, to reset the themes on every single blog though. And why is switch to blog in there???

    Yes in functions.php it’s bad idea…

    you could use the above code in the mu-plugins folder

    I don’t even listen about this folder ‘mu-plugins’. You need create it themself?

    About switch_to_blog, when we install new blog we are in scope of main-blog, but we need new sub-blog scope to switch theme…

    Andrea Rennick

    (@andrea_r)

    Customer Care at Copyblogger Media and Studiopress

    Use the code I gave about – they already built something for you to do this.

Viewing 14 replies - 1 through 14 (of 14 total)
  • The topic ‘Change default theme’ is closed to new replies.