Return to Snippet

Revision: 26831
at May 12, 2010 12:18 by labsecrets


Initial Code
1) Add this to the top of header.php

<?php do_action( 'walled_garden' ) ?>


2) Add this to the functions.php page (omit <?php and ?> tags if they already exist)

<?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( 'walled_garden', 'sh_walled_garden' );
?>

Initial URL

                                

Initial Description

                                

Initial Title
Private Social Network Site Code

Initial Tags

                                

Initial Language
PHP