Re: How to make a private community?
This is what I came up with:
place the function below into functions.php in your theme folder.
function sh_walled_garden()
{
global $bp;
if ( bp_is_register_page() || bp_is_activation_page() )
return;
if( ! bp_is_blog_page() && ! is_user_logged_in() )
bp_core_redirect( $bp->root_domain .'/'. BP_REGISTER_SLUG );
}
add_action( 'walled_garden', 'sh_walled_garden' );
and this right on top of header.php (before the <!DOCTYPE… parts):
<?php do_action( 'walled_garden' ) ?>
The above makes all BP pages private, except the registration and activation pages. It also leaves all blog pages public. It’s a bit easier than editing all theme pages.
Boris