/ Published in: PHP
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
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' ); ?>