Forums
-
- Forum
- Posts
-
- Installing BuddyPress
- 23,840
- How-to & Troubleshooting
- 129,871
- Creating & Extending
- 25,907
- Requests & Feedback
- 9,550
- Third Party Plugins
- 9,832
- Showcase
- 3,316
- Ideas
- 1,402
- Miscellaneous
- 9,179
-
Hi kp,
yes I’m with ya on keeping extra plugins to a minimum.
Code published here…
…with minor modification (to remove bbpress check) seems to achieve what you want, as per below:
function ps_guest_redirect() {
global $bp;
if ( bp_is_user() ) {
if(!is_user_logged_in() and !bp_is_register_page() and !bp_is_activation_page()) {
wp_redirect('https://google.com');
exit;
}
}
}
add_filter( 'get_header','ps_guest_redirect',1);