The MU forums have moved to WordPress.org

Creating a blog with always same theme, categorie and links (12 posts)

  1. nicobox
    Member
    Posted 15 years ago #

    Hi,

    Sorry but I don't write very well english.

    I need your help for the following issue :

    I have just created a multiblog Website.
    How to create a blog retrieving the same theme, category and links as the main site ?

    To understand my question, please find below an example :

    I create the website http://www.example.com, I customise it with a theme, new links and new categories.
    Now, I create several blogs :
    blog1.example.com
    blog2.example.com
    blog3.example.com

    When I create a blog, I want to retrieve the same configuration as the main site http://www.example.com (Theme, categories, links ...)

    How to do ?
    Currently, when I create a blog, I have to reappply theme, recreate categories, recreate links ... that is very long...

    Thanx for you help.
    Nico from Paris

  2. johnnytee
    Member
    Posted 15 years ago #

    You need to modify wp-includes/wpmu-functions.php on line 1412 look for install_blog_defaults.

    This function holds new blogs defaults.

  3. grandslambert
    Member
    Posted 15 years ago #

    NO, don't edit core files. There are plugins for this. For the theme and other defaults, try

    http://wpmudevorg.wordpress.com/project/New-Blog-Defaults

    And this one for categories:

    http://wpmudevorg.wordpress.com/project/new-blog-default-categories-plus-search-and-replace

    I am sure there are others too.

  4. johnnytee
    Member
    Posted 15 years ago #

    I agree don't modify the core unless you really know what your doing and there is no other way or hook in place.

    If you do, I suggest putting it under version control to keep track of changes.

    @grandslambert , these plugins you listed set default options, how do you go about adding default pages , and other db entries, besides options, on install. I have not found a clean way?

  5. grandslambert
    Member
    Posted 15 years ago #

    There are also some plugins for that I hear, but I haven't used any because I don't usually use "pages" in a blog. I just tried to find one but don't see any, and can't do a whole lot of searching since I am at work.

    However, I know there is the action hook

    add_action('wpmu_new_blog', 'function_name')

    So you can create a mu-plugin that has a function to do whatever you want, add pages, categories, set the theme, etc. The action sends the new blog ID to your function, then you can do whatever your want.

  6. johnnytee
    Member
    Posted 15 years ago #

    OK, after looking at the plugin http://wpmudevorg.wordpress.com/project/New-Blog-Defaults

    the author deletes the default db entries and recreates them.

    yes the author is hooking into add_action('wpmu_new_blog', 'function_name')

  7. nicobox
    Member
    Posted 15 years ago #

    Thanx a lot guys, I gonna evaluate these plugins
    See u

  8. nicobox
    Member
    Posted 15 years ago #

    I have just evaluated these plugins and it match my needs !
    Thanx guys.
    So, Do you know a similar plugin for links or another solution to keep links when i create a new blog ?

    Thanx for your help
    Nico from paris

  9. DeannaS
    Member
    Posted 15 years ago #

    If you can follow my code, you can write that part yourself. It wouldn't be that hard. I don't have time to add it right now - maybe in the next iteration.

  10. nicobox
    Member
    Posted 15 years ago #

    Ok I'd like to see your code as soon as you can.
    Thanx
    nico

  11. Ovidiu
    Member
    Posted 15 years ago #

    by her code I guess she meant her plugin, see link above to the new-blog-defaults plugin!

  12. nicobox
    Member
    Posted 15 years ago #

    new-blog-defaults does not include the possibility to avoid recreating links

About this Topic