User Registration

  1. Home
  2. Docs
  3. User Registration
  4. Troubleshooting
  5. Login redirect didn’t work?

Login redirect didn’t work?

If you are using the login shortcode along with the redirect_url paramter 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();
}
Was this article helpful to you? Yes No

How can we help?