Tagged: buddypress redirection
Hello,
After Creating a account using BP AJax registration,I need to redirect user to admin message private message page. To allow users to write directly.
Any Solution please ?
Hi Thierry,
Thank you for the question.
Please visit Dashboard->settings->Ajax Registration and click on “Register” tab.
There you can set the url you want to redirect to.
Regards
BrajeshHello,
Thank You for your answer. But how to make this :
1. User signup
2. Uer is redected to admin page private message section already anebled
3. User only have to write message.Cheers
Hi Thierry,
Do you want the user to be redirect to private message on their profile and where “admin” is selected as the receiver(send to)?Thank you
BrajeshHello Brajesh,
Yes it’s exactly what i need to do.
Hi Thierry,
Thank you. It will need a dynamic url with nonce. I am going to push an update to ajax registration plugin and will post the code for it then.Thank you
BrajeshHi Thierry,
We have released an update now.
Please upgrade to 2.0.6
https://buddydev.com/plugins/bp-ajax-registration/
You can put this code in your bp-custom.php
add_filter( 'bpajaxr_registration_redirect_url', function ( $redirect_url, $user_id ) { return wp_nonce_url( bp_core_get_user_domain( $user_id) . bp_get_messages_slug() . '/compose/?r=admin' ); }, 10, 2 );
and it will do the redirection.
PS:- I am asuming the username of administrator to be ‘admin’. If it is different, Please change accordingly.
Regards
BrajeshHello,
Thank you for this. Can you please tell me where to add that file ? Because i have issue when i place it on Wp-content/plugins/
Regards
Please make sure copy the code from my post and not from email notification.
You can put the code in your activetheme/functions.php or in wp-content/plugins/bp-custom.php
Regards
Brajesh
The topic ‘ [Resolved] How to redirect to another user private message page ?’ is closed to new replies.