Return to Snippet

Revision: 26783
at May 10, 2010 20:21 by widgetlaboratory


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 Network Code

Initial Tags


Initial Language
PHP