Reply To: redirect after login
@shanebp
it seems thats works for every users but not for the admin!
the url thats work for the admin is: site/members/admin instead of site/members/admin username i wonder why!
thats work, but to me is silly:
function custom_login_redirect_to($user_login, $user) {
if($user_login=='breakAdmin'){
bp_core_redirect( get_option('siteurl') . '/members/admin' );
}
bp_core_redirect( get_option('siteurl') . '/members/' . $user_login );
}
add_action('wp_login', 'custom_login_redirect_to', 10, 2);