Support » Fixing WordPress » How & where to change Password Protect HTML code…

  • Resolved JohnMiltonFogg


    I’m looking for the ftp (?) page where I can change “Submit” to “Send” and add a line space to the Password Form. I can see the code from the Page Source View:

    <form action=”” method=”post”>

    <p>This post is password protected. To view it please enter your password below:</p>
    <p><label for=”pwbox-131″>Password:
    <input name=”post_password” id=”pwbox-131″ type=”password” size=”20″ /></label>
    <input type=”submit” name=”Submit” value=”Submit” /></p></form>

    BUT, like Little BoPeep, I have no idea where to find them…

    Thanks for your help.
    I appreciate you.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Still hoping (praying, pleading…) for an answer to this one. I HAVE looked almost everywhere— almost ’cause if I’d been in the right place… never mind.


    Using on a locally residing copy of WordPress, searched for the text “This post is password protected” and found that in wp-includes/post-template.php

    But that code also provides a filter — meaning a plugin could be created to change that.

    return apply_filters('the_password_form', $output);

    Unless you do something like a plugin, note that changing core code means you will need to make changes in subsequent WordPress update.

    Just for grins this does add another line after the below: text:

    function modify_password_form($output) {
      if ( !$output ) return; // just in case nothing there
        $b = strpos($output, '</p>');
        $output = substr($output,0,$b+4) . "<p>&nbsp;</p>" . substr($output,$b+6);
      return $output;
    add_action('the_password_form', 'modify_password_form');

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘How & where to change Password Protect HTML code…’ is closed to new replies.