Hi, you can put the following code in your bp-custom.php
/**
* BuddyPress Logged In User redirection on Registration page
*
*/
function buddydev_loggedin_register_redirect( $redirect ) {
//you can do a lot here
//if you want to redirect based on profile field, member types or roles, you can do so
//$user_id = bp_loggedin_user_id();
//send to profile
//$redirect = bp_loggedin_user_domain();
// or you can simply hard code it
//$redirect = "http://yoursite.com/example-page"
return $redirect;
}
add_filter( 'bp_loggedin_register_page_redirect_to', 'buddydev_loggedin_register_redirect' );
Now uncomment on of the //$redirect block or you can put your own link.
Hope that helps.
That worked perfectly! Thanks! What if I want to disable the redirect entirely?
You are welcome!
I am not sure what do you mean by disabling the redirect. What purpose will it serve to show the registration page to the already logged in user? At the moment, if you want to show registration form to the logged in user, It can be done with some custom code, but it is not advisable.
Regards
Brajesh
I am developing a rather different membership scheme. I figured it out anyway. Thanks for the help Brajesh!