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 builders, 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();
}
Check How to add custom code snippet?

Powered by BetterDocs

Leave a Reply

Your email address will not be published. Required fields are marked *