User registration on sub site

What you’ve described is default behavior for WordPress where when a user registers on a subsite, they’re really registering with the root site. Check out this plugin, which looks to help with new user sign ups and adding them to the right subsite. http://wordpress.org/extend/plugins/wpmu-default-user-role/ If that plugin isn’t what you’re looking for then perhaps this … Read more

How to order by blog ID in this multisite ‘List Blogs’ custom function

The following query works. Note the quotes in AND blog_id != ‘1’ global $wpdb; $query = ” SELECT blog_id FROM $wpdb->blogs WHERE site_id = %d AND public=”1″ AND archived = ‘0’ AND mature=”0″ AND spam = ‘0’ AND deleted = ‘0’ AND blog_id != ‘1’ ORDER BY blog_id ASC”; $blogs = $wpdb->get_col( $wpdb->prepare( $query, $wpdb->siteid) … Read more

Customize multisite site creation with user data

To create a basic plugin, add a directory in wp-content/plugin, then put a php file in it with the required header, and that’s it. Now, here is how to use the action : add_action( ‘wpmu_new_blog’, ‘user16975_customize_blog’, 10, 6); function user16975_customize_blog($blog_id, $user_id, $domain, $path, $site_id, $meta ){ // do not forget to select the correct blog … Read more

WPMU – new users are automatically subscribed to the main blog – how to prevent that?

This is a known bug. A fix will be available in 3.6.1, see: http://core.trac.wordpress.org/ticket/25166 For now, either bulk remove the users in WP Admin or do something (ugly and temporary, remove when 3.6.1 is available) like: add_action( ‘wpmu_new_user’, function ( $user_id ) { global $current_site; remove_user_from_blog( $user_id, $current_site->blog_id ); // remove user from main blog. … Read more