Title: Customize the Protected Text
Last modified: August 20, 2016

---

# Customize the Protected Text

 *  [rev.alice](https://wordpress.org/support/users/revalice/)
 * (@revalice)
 * [13 years, 3 months ago](https://wordpress.org/support/topic/customize-the-protected-text/)
 * Hi !
    I have a problem whith this fonction in version 3.5.1
 * —————————
 *     ```
       <?php
       function my_password_form() {
           global $post;
           $label = 'pwbox-'.( empty( $post->ID ) ? rand() : $post->ID );
           $o = '<form class="protected-post-form" action="' . get_option( 'siteurl' ) . '/wp-pass.php" method="post">
           ' . __( "To view this protected post, enter the password below:" ) . '
           <label for="' . $label . '">' . __( "Password:" ) . ' </label><input name="post_password" id="' . $label . '" type="password" size="20" /><input type="submit" name="Submit" value="' . esc_attr__( "Submit" ) . '" />
           </form>
           ';
           return $o;
       }
       add_filter( 'the_password_form', 'my_password_form' );
       ?>
       ```
   
 * —————————
    The text is changed, but when you enter the password and nothing !
   You have an idea ? thanks for your help !
 * _[please [allow more time to get a reply](http://codex.wordpress.org/Forum_Welcome#No_Bumping)]_

The topic ‘Customize the Protected Text’ is closed to new replies.

## Tags

 * [pasword](https://wordpress.org/support/topic-tag/pasword/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 0 replies
 * 1 participant
 * Last reply from: [rev.alice](https://wordpress.org/support/users/revalice/)
 * Last activity: [13 years, 3 months ago](https://wordpress.org/support/topic/customize-the-protected-text/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
