How to add a placeholder to the protected post password input
This can be achieved via a hook, called the_password_form: function my_theme_password_placeholder($output) { $placeholder=”Hello!”; $search=”type=”password””; return str_replace($search, $search . ” placeholder=\”$placeholder\””, $output); } add_filter(‘the_password_form’, ‘my_theme_password_placeholder’); A str_replace searches for the string type=”password” inside the output. This gives an attribute to the <input> indicating it’s of type password. The replacement string contains the searched one plus the … Read more