The MU forums have moved to WordPress.org

How to set default theme? (32 posts)

  1. scyl
    Member
    Posted 17 years ago #

    Hi,

    Can anyone tell me how to set the default theme for when a new blog is created by a user? And also, how to set certain default plugins?

    Thanks!

    Michel

  2. donncha
    Key Master
    Posted 17 years ago #

    That's not possible right now, but if you want to add the functionality it should be easy enough. Drop a patch on Trac and I'll integrate it!

  3. Xen
    Member
    Posted 17 years ago #

    hrm, default theme sounds like a good idea...

    also permissions on a per-plugin basis, like I don't want my users to be able to use the sitemap plugin... ^_^

  4. drmike
    Member
    Posted 17 years ago #

    That's mighty strange as I'm seeing template and stylesheet being selected.

    Lines 280 and 281 of wp-admin/upgrade-schema.php in the populate_options function.

    add_option('template', 'default');
    add_option('stylesheet', 'default');

    And I thought we had a plugin that allowed plugins to be defined on a case by case basis.

  5. scyl
    Member
    Posted 17 years ago #

    Works like a charm drmike, thanks!

  6. drmike
    Member
    Posted 17 years ago #

    No big. :)

    By the way, I know I'm big on making changes directy to code and whatnot. I do hope you folks are keeping track of what you change so you can go back and reapply these changes after upgrading.

    I know I lost my additions and corrections to my installed links a few days ago when i did my last upgrade. :)

  7. andrea_r
    Moderator
    Posted 17 years ago #

    Just to toss out an indea that's on my wishlist, how hard would it be to assign a *random* theme on startup? :)

  8. drmike
    Member
    Posted 17 years ago #

    I can see how it's possible since if you call the function get_themes() out of wp-includes/themes.php, you get teh array of themes loaded into $themes but I don't know of how to pull out a random record out of that.

  9. modifiedcontent
    Member
    Posted 17 years ago #

    Donncha said:

    That's not possible right now...

    That's shocking. Being able to set the theme for the blogs users create is essential!

    :-(

    I'm trying to build a site with its own look. Blogs on the site are supposed to be visibly part of the site. I have no use for cutesy functionality like options for users to choose their own themes etc. ('...assign a *random* theme...'?!) I want to control what users are doing on my system.

    Deleting the themes that came with the system, including the default theme folder, was one of the first things I did after install...

    I don't like making changes to the code either, but in this case I guess I have no other choice than use drmike's solution (thanks!).

  10. andrea_r
    Moderator
    Posted 17 years ago #

    If you've already deleted the default theme, why not just put whatever default you want to use in a folder called "default"?

    You may have to edit the theme styleshet as well, but that would be MUCH easier than mucking about in code. And well as easier to change when you want a new default (rename folders).

  11. modifiedcontent
    Member
    Posted 17 years ago #

    Good point andrea_r!

  12. drmike
    Member
    Posted 17 years ago #

    Or do what i suggested and just modify the code. :)

  13. mrjcleaver
    Member
    Posted 17 years ago #

    How about replacing the directory 'default' with a symlink to the theme of your choice?

  14. mrjcleaver
    Member
    Posted 17 years ago #

    Yup. It worked for me.

  15. drmike
    Member
    Posted 17 years ago #

    Agreed but most of us have hosting backends that don't do symlinks. :(

  16. mickemus
    Member
    Posted 17 years ago #

    another item for global options??

    /Preacher Man

  17. mrjcleaver
    Member
    Posted 17 years ago #

  18. eminemjamesuk
    Member
    Posted 17 years ago #

    Wait, so how do you do it? And where do you find a widget-enabled version of Kubrick?

  19. drmike
    Member
    Posted 17 years ago #

    Well most of us edited the files within Kubrick to make it use widgets. You should be able to edit your own files if you're trying to run a WPMu install. You can find instructions here.

    The solution to defining the default themes is stated here in this thread near the top. Please reread the thread to see it. You should be able to read a thread that you post in to be able to run your own WPMu install. :)

    Hope this helps,
    -drmike

  20. aoleonthemartiangirl
    Member
    Posted 17 years ago #

    That stinks! You should be able to set the default setup theme in the activation/deactivation theme panel. Any news on when Mu will by updated on par with regular WP 2.1?

  21. lunabyte
    Member
    Posted 17 years ago #

    Um, it is 2.1, and just renaming a dir to default doesn't suck.

    Makes it easier to recognize what's the default when you're at the line or in with ftp.

  22. drmike
    Member
    Posted 17 years ago #

    Actually it's more 2.2 now I would think as what Donncha's adding is from the 2.2 alpha.

  23. andrea_r
    Moderator
    Posted 17 years ago #

    "You should be able to set the default setup theme in the activation/deactivation theme panel."

    That's for choosing a layout for the current blog, duh.

  24. drmike
    Member
    Posted 17 years ago #

    Actually I can see the posters point of view. There should be these options within the Site Admin page.

    I would love to see a GUI interface for Apache as well.

    Most of us understand that not everything is at an interface. We know there is some editing of files required.

  25. NetMermaid
    Member
    Posted 16 years ago #

    To designate a different theme as the WordPress default theme:

    1) Rename the existing default WordPress theme folder to something else

    2) Rename the theme folder of your choice to 'default'

    3) Then your designated theme will become the default theme for all new registrants

  26. Anonymous
    Unregistered
    Posted 15 years ago #

    I know this is an old post, but it came up on the forum search and I just wanted to add my little bit in-case it helps anyone.

    Obviously the easiest way to change the theme for all users including new registrations is to change the name of the default theme directory to something like 'old_default' and then change the theme directory you would like to use to 'default'... thus making your new theme, the theme the script is actually looking to use.

    A little tip however for those who struggle would be to set your install to the original default theme first and then change the directory names. A quick refresh of your blogs will suddenly render results.

    Loving WPMU by the way!

    //Johnathan

  27. jagalizzi
    Member
    Posted 15 years ago #

    I want to change the default theme and I alredy rename the folder and delete the original default theme but now the theme appears broken, I mean, a part with the theme that I want and a part with the original default theme.
    I read that I have to change the stylesheet file but, what changes I have to make?

    Look like appears: http://energyenhancement.org/Spiritual-Blogs/jaga/

  28. 3coastmedia
    Member
    Posted 15 years ago #

    As of 2.7 this information:

    *******************************************
    Lines 280 and 281 of wp-admin/upgrade-schema.php in the populate_options function.

    add_option('template', 'default');
    add_option('stylesheet', 'default');
    *******************************************

    has changed to:

    ===========================================
    Lines 311 and 312 of wp-admin/includes/schema.php in the populate_options function.

    add_option('template', 'yourthemename');
    add_option('stylesheet', 'yourthemename');
    ===========================================

  29. VentureMaker
    Member
    Posted 15 years ago #

  30. Ovidiu
    Member
    Posted 15 years ago #

    4,5,6 http://wpmudevorg.wordpress.com/project/New-Blog-Defaults :-) and this one is free but beware there is a small bug which I reported today to Deanna, maybe wait another day for an update.

About this Topic

  • Started 17 years ago by scyl
  • Latest reply from miketempleton