Forums
-
- Forum
- Posts
-
- Installing BuddyPress
- 23,840
- How-to & Troubleshooting
- 129,872
- Creating & Extending
- 25,903
- Requests & Feedback
- 9,548
- Third Party Plugins
- 9,832
- Showcase
- 3,316
- Ideas
- 1,402
- Miscellaneous
- 9,178
-
Just incase it helps anyone else, the following code resolved the issue for me:
//Hide for non-logged-in users (public visitors)
add_action( ‘init’, function() {
if ( ! is_user_logged_in() && !bp_is_members_directory() && bp_is_user() ) {
bp_core_redirect( site_url(‘/content-restricted/’) );
} else {
// Do nothing.
}
} );