I have so problem.
After install plugin works fine, but some times later it’s breaks
Maybe after update WP to 3.0.4
Thread Starter
Alvaro
(@nicardo)
yes I too had the same problem but when I degraded my wordpress version to 3.0.1 it is working fine
Jaap
(@frostbite117)
This works for me:
1. Go to the functions.php file from your BuddyPress theme.
2. Add this at the top of the php:
<? ob_start(); ?>
<i>So you’ll not get any white screens.</i>
3. Then add this at the bottom of the php:
<?php
function ds_one_blog_only($active_signup) {
// get the array of the current user's blogs
$blogs = get_blogs_of_user( get_current_user_id() );
// all users may be members of blog 1 so remove it from the count, could be a "Dashboard" blog as well
if ($blogs["1"]) unset($blogs["1"]);
//if the user still has blogs, disable signup else continue with existing active_signup rules at SiteAdmin->Options
$n = count($blogs);
if($n == 1) {
$active_signup = 'none';
echo '';
} elseif($n > 1) {
$active_signup = 'none';
echo '';
} else {
$active_signup = $active_signup;
}
return $active_signup; // return "all", "none", "blog" or "user"
}
add_filter('wpmu_active_signup', 'ds_one_blog_only');
?>
<i>This will remove the ‘Create a blog’ button when a user already has a blog.</i>
Cheers!
J.
Thank you Jaap, but it’s only work for limit one blog per user. How if we want to limie 2 or more blogs per user?
You Just change the number from 1 to 2 (or 3 or 4 or….)
🙂
Works but….
In the Blogs Admin panel – if you select ‘create site’ it goeas off to a 404 page. While this is limiting the user to 1 site, it is not good UI design.