WordPress password field ’empty’ error in Chrome

WordPressIf you’re using Google Chrome, on occasion you’ll encounter an error when logging into WordPress. Even though the password field is filled in (with your saved password), you’ll receive a message that the password field is empty.

Here’s how to fix it, and props to whomever figured this out:

  1. Once you log into your Dashboard, go to Appearance and then Editor. Select Theme Functions (functions.php).
  2. Insert this code anywhere after the initial “<?php” code:

add_action(“login_form”, “kill_wp_attempt_focus”);
function kill_wp_attempt_focus() {
global $error;
$error = TRUE;
}

This has worked for the various WordPress sites we manage.