Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I am trying to use the built in post/page password protection feature on Wordpress 3.4. However, on the password protected page when you click submit, you are taken to the wp-login page or dashboard, not the actual page. I've updated the functions.php to include the most recent code from the codex, specifically: $o = '<form class="protected-post-form" action="' . get_option('siteurl') . '/wp-login.php?action=postpass" method="post"> I've also tried setting the permalink to default and back to custom, clearing page & browser caches, and deleting/rebuilidng the .htaccess, and NOTHING has worked.

Can anyone assist in this matter? I'm utterly stumped at this point : \

Thanks in advance!

Full Code:

// Change Password Required Style
function matrix_password_form() {
    global $post;
    $label = 'pwbox-'.( empty( $post->ID ) ? rand() : $post->ID );
    $o = '<form class="protected-post-form" action="' . get_option('siteurl') . '/wp-login.php?action=postpass" method="post">
    <p>' . __( "This post is password protected. To view it please enter your password below:", 'matrix' ) . '</p>
    <label class="pass-label" for="' . $label . '">' . __( "PASSWORD:", 'matrix' ) . ' </label><input name="post_password" id="' . $label . '" type="password" size="20" class="input-field"/><input type="submit" name="Submit" class="submit-button" value="' . esc_attr__( "Submit" ) . '" />
    return $o;
add_filter( 'the_password_form', 'matrix_password_form' );
share|improve this question

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.