Removing the Login Shake Effect

Every time you failed to login in WordPress because of wrong password or username, you must have seen the shake effect. I personally do like it and I think it’s a great way to let users know that your password of username was wrong (even though it shows the error message anyway).

However, if you don’t like it for some reason. You can easily remove that effect simply adding the following snippet on your theme’s functions.php file.

add_action('login_head', 'remove_login_shake');
function remove_login_shake() {
    remove_action('login_head', 'wp_shake_js', 12); 

All we are doing here is creating a custom function and asking WordPress to remove certain functionality using WordPress’s built-in remove_action function. You can head towards the WordPress Codex link given below for better understanding.

Source: remove_action

Today In History



Leave a Reply

Note: Convet HTML, PHP, JavaScripts from HTMLify, before posting from comment section.
License: By submitting a comment here you grant this site a perpetual license to reproduce your words and name/Web site in attribution. Please use your real name or a pseudonym (i.e., pen name, alias, nom de plume) when commenting. If you add your site name, company name, or something completely random, I'll likely change it to whatever I want.