Using WordPress login for a non word-press website
Using WordPress login for a non word-press website
Using WordPress login for a non word-press website
Custom user roles are unable to login
Problem with is_user_logged_in() function in some pages
Unable to login after registration
You can simply get the page where the user is coming from using $_SERVER[“HTTP_REFERER”] and replace your redirect to the homepage like below: // if meta exists, and the user information is up to date, redirect to homepage else { $redirect = $_SERVER[“HTTP_REFERER”]; wp_redirect( $redirect ); exit; }
You can hook to the wp_login_errors filter. add_filter(‘wp_login_errors’, function($errors, $redirect_to){ if(isset($errors->errors[‘incorrect_password’]) && in_array(‘custom_role’, (array) get_user_by(‘login’, $_POST[‘log’])->roles)){ $errors->errors[‘incorrect_password’][0] = ‘Custom message’; } return $errors; }, 10, 2); EDIT: This should work with WooCommerce login form or any other form that implements wp_signon: add_filter(‘authenticate’, function($user, $username, $password){ if(is_wp_error($user) && isset($user->errors[‘incorrect_password’]) && in_array(‘custom_role’, (array) get_user_by(‘login’, $username)->roles)){ $user->errors[‘incorrect_password’][0] = … Read more
Login issue with subdomain installs
You can bypass Force Login based on any condition by adding the v_forcelogin_bypass filter to your theme’s functions.php file. You may also use the WordPress Conditional Tags. For example: /** * Bypass Force Login to allow for exceptions. * * @param bool $bypass Whether to disable Force Login. Default false. * @return bool */ function … Read more
Login form does not store/remember/suggest users password
Try this .wp-core-ui .button-primary.focus, .wp-core-ui .button-primary:focus { box-shadow: 0 0 0 1px #fff, 0 0 0 0px #007cba !important; } or replace the color with something that goes with your background: #007cba