How to Remove the Login Shake Effect From WordPress

How to Remove the Login Shake Effect From WordPress

If you’ve ever forgotten the password for your WordPress site, then you know the login box shakes.

I don’t really mind it at all, though for sites that have a custom login page, the shake effect might not suit the tone of the company.

Plus, the shake and the red error box are more than enough to get across to a user that they have the wrong login credentials.

In today’s Weekend WordPress Project I’ll show you how to quickly remove the shake effect.

Login form
Easily remove the shake effect from the WordPress login page.

Remove the Login Shake

You can remove the action for the Javascript that makes the login form shake by adding the following snippet to your theme’s functions.php file:

{code type=php}
function my_login_head() {
remove_action(‘login_head’, ‘wp_shake_js’, 12);
add_action(‘login_head’, ‘my_login_head’);

The login shake no doubt gets a user’s attention and can be a helpful visual cue, so if you like it there’s so reason to remove it.

But if the login shake doesn’t suit your theme or you just find if off-putting, you may want to use this guide to turn the effect off.