Skip to:
Content
Pages
Categories
Search
Top
Bottom

Re: How to make a private community?


Josh Frank
Participant

@iamjoshfrank

Wanted to say thank you and put in my endorsement for @Travel-Junkie ‘s great, simple privacy solution.

Re-posting that code below for simplicity’s sake, found at this comment link:
https://buddypress.org/community/groups/how-to-and-troubleshooting/forum/topic/how-to-make-a-private-community/?topic_page=2&num=15#post-44616

Running WP 3.0.1 single-site with BuddyPress 1.2.5.2.

Add to functions.php (may be titled Theme Functions in your Dashboard Theme Editor):

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( ‘get_header’, ‘sh_walled_garden’ );

Skip to toolbar