It looks like there is not an easy way to add autocomplete=”off” to the password input on the WordPress login page without editing the wp-login.php page directly.
Is there something I’m missing? I do not want to modify core files.
It looks like there is not an easy way to add autocomplete=”off” to the password input on the WordPress login page without editing the wp-login.php page directly.
Is there something I’m missing? I do not want to modify core files.
Your only solution (without modifying core files) is to use JavaScript.
function wpse_159462_login_form() {
echo <<<html
<script>
document.getElementById( "user_pass" ).autocomplete = "off";
</script>
html;
}
add_action( 'login_form', 'wpse_159462_login_form' );
Having said that, if you’re not the only one that will be signing in I would advise against disabling autocomplete, it will almost certainly **** people off.