WordPress.org

Ready to get started?Download WordPress

Forums

New sites on multisite install - what actions/hooks are available? (2 posts)

  1. pnoonan
    Member
    Posted 12 months ago #

    We have a multisite created and plan to make a lot of sub-sites on the network. We'd like the sub-site to do as much set up on its own as possible: creating certain pages, setting up nav menus, installing plugins / importing settings.

    What actions are available for us to hook into when creating a new site on a multi-site install?

    Related: the sub-sites will have only one theme to choose from. As a result, this will be automatically activated upon site creation. Does this mean we are not able to hook into the "switch theme" action? I.e., if there is only one theme, it will never be "switched".

    Really just looking for someone to shine a spotlight on what specifically happens when a sub-site is activated. Thanks -

    Patrick Noonan

  2. Related: the sub-sites will have only one theme to choose from. As a result, this will be automatically activated upon site creation

    You can define the default theme in wp-config

    define( 'WP_DEFAULT_THEME', 'twentyten' );

    Change twentyten to whatever and no one has to 'switch' ever.

    http://codex.wordpress.org/WPMU_Functions has some of the functions you may be looking for. You'll also want to look at the wp-includes/ms-functions.php file and /ms-blogs.php files.

Reply

You must log in to post.

About this Topic