How to Display the WordPress Password Protected Form in Regular Text Rather Than Password Dots

WordPress has a simple feature to password protect posts with a simple password rather than a login. This form of password protection is not as secure as login protection, but it can be good for hiding non-sensitive internal documents, membership-only content created on a different platform, sharing coupons, etc.

password protect wordpress post
Example of a password field with those dots

So long as we’re saying, “This stuff isn’t actually all that important anyway,” why not remove those secretive password dots and just let people see what they type? Sure, it’s less secure – we’ve already made the decision that this stuff is less secure – but it’s also more user-friendly to display the password.

So today I wrote a simple jquery function to switch the password protected field’s type from “password” to “text”:

$("input[type='password'][name='post_password']").get(0).type = 'text';

You’ll need to load that in your theme’s header.php, footer.php, or a functional plugin, of course.

Is this helpful?

Posted in

Toby Cryns

Toby Cryns is a freelance CTO, expert WordPress developer, and teacher.

He offers free advice to improve your freelance biz.

He also publishes small droppings every now and them to https://twitter.com/tobycryns and https://twitter.com/themightymo.com

Follow Toby's contributions on Github and WP.org.