Privacy


#1

Hello,

is it possible that only registered users can see the buddypress activity stream and the member directory? I’m not sure, if I can realize that via the theme. I use the child theme. Many thanks in advance.


#2

Hello Deinhard,

Add below code to functions.php file,

add_action( 'wp_head', 'rtp_confirm_login', 1 ); function rtp_confirm_login() { global $bp; $root_slug = bp_get_root_slug(); // If not members or activity page return if( $root_slug != 'members' && $root_slug != 'activity' ) { return; } // Otherwise check if user not logged in and redirect if( !bp_loggedin_user_id() ) { wp_redirect( site_url() ); exit; } else { // If logged in, then display the page return; } }

This code check if the user is not logged in then redirect to the home page, otherwise show user activity and members page.

Let me know if this is what you need.


#3

Hello Manish,

it works fine :-) Many thanks.


#4

@deinhard

Glad to know your issue got solved. I am closing this support thread. If you face any other issue in future, please create another thread.


#5