OPTION Protected Profile Policy:
There is no option redirect to “custom URL or homepage example” can you please update? Or give me code to redirect to homepage?
Hello Julia,
Please use the following url in your “bp-custom.php” file to redirect user on home page.
function buddydev_redirect_user_on_restricted_profile( $location ) { $location = get_home_url(); // For home url return $location; } add_filter( 'bp_profile_visibility_redirect_location', 'buddydev_redirect_user_on_restricted_profile' );
Regards
RaviHi,
Thank code worked.
Another question:
I also use bellow “code snippet” to auto redirect user who is normal login (NOT first time) redirect to PROFILE page
https://buddydev.com/buddypress/buddypress-trick-redirect-users-to-their-profile-on-login/
This code is not work, when user normal login it always reload at current page. Can you help me check the code?
P/S: My theme defaul coded redirect for user login to current page, there is no other option in theme.
Thanks
Hi, I fixed issue.
Now what is the code spinned also restrict /members page for none logged in user redirect to home page?
Hello Julia,
Thank You for acknowledgement. Use the following code.
function buddydev_members_directory_redirect() { if ( bp_is_members_directory() && ! is_user_logged_in() ) { bp_core_redirect( get_home_url() ); } } add_action( 'bp_template_redirect', 'buddydev_members_directory_redirect' );
Thank You
RaviIt worked.
Can u help me in bellow topic
https://buddydev.com/support/forums/topic/correct-add-class-to-buddypress-register-popup/Hi Julia,
Please do mark a topic as resolved when it is fixed. It helps us manage the support better.I am looking at your other issue now.
Thank you.
Brajesh
The topic ‘ [Resolved] BP profile visibility redirec option.’ is closed to new replies.