Skip to:
Content
Pages
Categories
Search
Top
Bottom

Re: How to make a private community?


Jamie Marsland
Participant

@jamesmarsland

@Travel-Junkie: Your code below works great for WordPress 3 and Buddypress but not for multisite sub blogs? I need to stop access to sub blogs as well if users are not logged in. If i type in the url of my sub blogs then they show up. Is there anyway to stop this?

tks
james

function sh_walled_garden()
{
global $bp;

if( bp_is_register_page() || bp_is_activation_page() )
return;

if( ! is_user_logged_in() )
bp_core_redirect( $bp->root_domain .’/’. BP_REGISTER_SLUG );
}
add_action( ‘get_header’, ‘sh_walled_garden’ );

Skip to toolbar