Or, embed this snippet using GenerateWP WordPress Plugin.

Download

Clone

Redirect to custom page after logging in

On successfully login, redirect the user to a custom ‘welcome’ page, using ‘login_redirect’ filter.

function redirect_after_user_login( $redirect_to, $requested_redirect_to, $user ) {
	return home_url( '/welcome/' );
}
add_filter( 'login_redirect', 'redirect_after_user_login', 10, 3 );