Login redirect didn’t work?

If you are using the login shortcode along with the redirect_url parameter like [user_registration_login redirect_url=”/”] in widgets or on pages with page builder, login redirect might not work. You need to manually add the following codes to your child theme’s functions.php

add_filter( 'user_registration_login_redirect', 'ur_redirect_after_login', 10, 2 );

function ur_redirect_after_login( $redirect, $user ) {
     return home_url();
}

Powered by BetterDocs