X

Redirect BuddyPress User After Login

This snippet will let you redirect users after login to a specific page. Just update bp_core_redirect( get_option('home') . '/the-slug/' ); and change /the-slug/ to the slug of the page you wish to load. Add this function to bp-custom.php of your theme and you are all set.

function wps_redirect_bp_login() {
  if( is_user_logged_in() && bp_is_register_page() ) {
    bp_core_redirect( get_option('home') . '/the-slug/' );
  }
}
add_action( 'template_redirect', 'wps_redirect_bp_login', 1 );

Comments  Leave a Reply

Add a Comment

We're glad you have chosen to leave a comment. Please keep in mind that all comments are moderated according to our privacy policy, and all links are nofollow. Do NOT use keywords in the name field. Let's have a personal and meaningful conversation.

WordPress Launch Checklist

The Ultimate WordPress Launch Checklist

We've compiled all the essential checklist items for your next WordPress website launch into one handy ebook.
Yes, Send Me the Free eBook!