Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Add a 'Show Password' on Paid Memberships Pro login page.
* Add a checkbox to frontend login page of WordPress to toggle the password text visible/hidden.
* Add this code to a custom plugin or Code Snippets Add On:
* Source:
function my_pmpro_show_password_login_toggle( $items, $args ) {
$items .= '<input type="checkbox" onclick="my_show_password()"> Show Password';
function my_show_password() {
var x = document.getElementById("user_pass");
if (x.type === "password") {
x.type = "text";
} else {
x.type = "password";
return $items;
add_filter( 'login_form_middle', 'my_pmpro_show_password_login_toggle', 10, 2 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment