Here’s a plugin you could try, there’s a quite a few that will hide/redirect access requests to the signup page so you may want to do some research.
BuddyPress Members Only
Thanks alot Venutius. Except for the bad reviews on that plugin it seems to be a good fit to try.
I will try to keep on google and look in the support forum, to do some more research as you propouse.
If anyone else have anything to recommend I am all ears 🙏
This might work for you, it will restrict non-loggedin from accessing user profiles & members page.
Change the redirect URL as appropriate.
function michael_bp_not_loggedin_redirect() {
global $bp;
if ( is_buddypress() or bp_is_user() ) {
if ( !is_user_logged_in() and !bp_is_register_page() and !bp_is_activation_page() ) {
wp_redirect('https://yourwebsite/wp-login.php');
exit;
}
}
}
add_filter( 'get_header' , 'michael_bp_not_loggedin_redirect',1 );
If you also want to restrict bbpress, then change the third line to:
if ( is_buddypress() or bp_is_user() or is_bbpress() ) {
Thanks for the code tip.
I also got this recommended for me: https://wordpress.org/plugins/lock-my-bp
I think with all these tips and plugins etc I will try some out and evaluate. I will try to remember to update this thread on what solution I go with and how it works.
A quick update for others that are looking to do this.
I choose https://wordpress.org/plugins/lock-my-bp
Works great, easy to use and is 100% free. The only small issue as of now is a slight issue that the blog articales can be shown as not logged in – even if the blog page is locked. Hopefully the plugin creator will see this and make it work. But its a small issue really. Love the plugin.
I had the same issue. But the plugin you recon does not work with BP 12.X (without Classic Theme). It was last updated 8 months ago. So I chose the BuddyPress Members only plugin which does the job.