I’m having the same problem. Does anyone have a solution for this?
Thanks!
The normal behaviour is to allow anyone to see profiles.
You can limit this to only logged in users by adding some code to a couple of files.
If you have c-panel or ftp access and know how to transfer files, come back and I’ll help you with the changes.
I see.
Yes, I have access and can transfer files. Further help much appreciated.
Ok, I created the changes needed – go to my site and download the changed files – instructions are there
bbPress – Making Profile Pages Private
Come back if you have any queries
hi @robin-w, didn’t work 😞
It should still work.
can you tell, me what your theme is?
Hey, It does not work for me either.
Maybe you mean the buddypress profile page?
in that case this piece of code in the functions.php of your theme might help:
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 .'/'. 'LOGIN_PAGE_NAME' );
}
add_action( 'get_header', 'sh_walled_garden' );
‘LOGIN_PAGE_NAME’ = whatever page name you use to login
and in case if the plugin Buddypress is not installed, something like this might be useful:
// redirect if the url contains the word 'user' and if you are not logged-in
add_action('init', 'profile_redirect');
function profile_redirect() {
if(strpos($_SERVER['REQUEST_URI'], 'user') !== false && ! is_user_logged_in()) {
wp_redirect("https://www.whateversite.com/" . LOGIN_PAGE_NAME);
}
}
‘LOGIN_PAGE_NAME’ = whatever page name you use to login.
Change the word ‘user’ to your needs.