PHP Code SnippetAfter installing a child theme, navigate to Appearance > Theme Editor > functions.php and paste at the bottom of the input.
//enable password function custom_enqueue_scripts() { if (!is_admin()) { // Ensure it loads only on the front-end wp_enqueue_script('jquery'); } } add_action('wp_enqueue_scripts', 'custom_enqueue_scripts');
JS Code SnippetOn the page you want this to appear, add an HTML widget (FREE) and paste the code in there. Be sure to have < script> before your code and after the code if it isn't already inserted above.
jQuery(document).ready(function($) { // Create eye icon element var eyeIcon = $('
');
// Append eye icon to the password field's parent $('input[type="password"]').each(function() { $(this).parent().append(eyeIcon.clone()); });