Removing the Login Shake Effect

  • iftekhar
  • Apr 1, 2014
  • 0 comment
  • 1682 Views
  • Print

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
function remove_login_shake() {
    remove_action('login_head', 'wp_shake_js', 12); }
add_action('login_head', 'remove_login_shake');
?>

All we are doing here is creating a custom function and asking WordPress to remove certain functionality using WordPres’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

Note: Convet HTML, PHP, JavaScripts from Postable, 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.