Skip to:
Content
Pages
Categories
Search
Top
Bottom

Re: How to make a private community?


Anonymous User 96400
Inactive

@anonymized-96400

@r-a-y

cheers! didn’t even think of the get_header action. even cleanerer…

@hachimaki and @marioe,

well, don’t know why it’s not working for you guys, works perfectly for me… maybe you did paste something wrong. try just this in functions.php:

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' );

You can delete the walled_garden action call in header.php

Skip to toolbar