Hi,
is there a way to redirect to a custom page instead of the personal profile after auto activation/login?
Thanks,
FrancescoHi Francesco,
Thank you for asking.
yes, you can do that easily.add_filter( 'bpdev_autoactivate_redirect_url', 'redirect_to_edit_profile', 10, 2 ); function redirect_to_edit_profile( $profile_url, $user_id ) { return "http://yoursite.com/yourcustomurl"; //or you may use the $user_id to build a dynamic url }
Please put the above code and change the url to anything.
That will work.
May I put the code in the bp-custom.php file?
Thanks.Hi, I created bp-custom.php as you suggested but at the end of the registration process, the website returns this error:
add_filter( ‘bpdev_autoactivate_redirect_url’, ‘redirect_to_edit_profile’, 10, 2 ); function redirect_to_edit_profile( $profile_url, $user_id ) { return “http://instantcoach.me/welcome-instantcoach-community/”; }
Warning: session_start(): Cannot send session cache limiter – headers already sent (output started at /home/admin/public_html/instantcoach.me/wp-content/plugins/bp-custom.php:6) in /home/admin/public_html/instantcoach.me/wp-content/plugins/wise-chat/src/dao/user/WiseChatUserSessionDAO.php on line 95Hi Francesco,
Are you using closing php tags in your bp-custom.php like this??>
If yes, Please delete that. That will fix the issue. It is happening becuse there are some spaces getting sent to the browser from your bp-custom.php
If no, Please post the complete code from your bp-custom.php(including php tags) on the pastebin and I can quickly assist.Thank you
Brajesh
You must be logged in to reply to this topic.