Re: All site data visible to members and non-members alike
@r-a-y thanks for this and I have seen this code before and tried it several times but I cant get it to work…I know its me….Im just not putting it in the right place on the functions.php page. Ive put it at the very start of the page. For example:
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’ );
/* Stop the theme from killing WordPress if BuddyPress is not enabled. */
if ( !class_exists( ‘BP_Core_User’ ) )
return false;
/* Register the widget columns */
register_sidebars( 1,
array(
‘name’ => ‘Sidebar’,
‘before_widget’ => ‘
‘after_widget’ => ‘
‘,
‘before_title’ => ‘
‘,
‘after_title’ => ‘
‘
blah blah……….
Is that correct? Because when I do this I get an error reading.
I just need to know “exactly” where to put it on the page. For example put it between “x” and “y”.
Thanks for getting back to me promptly though…appreciate it.