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.
<?php
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
Comment
Leave a Reply