• pacuthbert

    (@pacuthbert)


    I was wondering if anyone would be able to help me out with this. I’ve got a client section where I’ve password protected pages and post.

    When I enter the password and the correct one, it takes forever to load up (more like never, but pretends to load). Then if it succeeds, which is rare, the page just turns out with nothing loaded except for

    “0” without the quotation marks.

    I’m a bit baffled. The page it tries to go to is: /wp-login.php?action=postpass

    I’ve tried deactivating and reactivating all my plugins. As well as putting this

    add_filter( 'the_password_form', 'custom_password_form' );
    function custom_password_form() {
    	$url = get_option('siteurl');
    	$url = preg_replace("/^http:/", "https:", $url);
    	global $post; $label = 'pwbox-'.( empty( $post->ID ) ? rand() : $post->ID ); $o = '<form class="protected-post-form" action="' . $url . '/wp-login.php?action=postpass" method="post">
    ' . __( "<h2>Enter password</h2>
    <p>This content is password protected. To view it please enter the password below:</p>" ) . '
    <label for="' . $label . '">' . __( "Password:" ) . ' </label><input name="post_password" id="' . $label . '" type="password" size="20" /><input type="submit" class="submit" name="Submit" value="' . esc_attr__( "Submit" ) . '" /> </form>
    ';
    return $o;
    }

    in my functions.php file but it doesn’t work.

    Any help or pointers would be lovely. Thank you so much!

Viewing 2 replies - 1 through 2 (of 2 total)
  • esmi

    (@esmi)

    Have you tried:

    – deactivating all plugins to see if this resolves the problem. If this works, re-activate the plugins one by one until you find the problematic plugin(s).

    – switching to the default theme to rule out any theme-specific problems.

    resetting the plugins folder by FTP or PhpMyAdmin. Sometimes, an apparently inactive plugin can still cause problems.

    – re-uploading all files & folders – except the wp-content folder – from a fresh download of WordPress. Make sure that you delete the old copies of files & folder before uploading the new ones.

    Thread Starter pacuthbert

    (@pacuthbert)

    I’ll try resetting all the plugins and changing to the default theme. If that fails, I’ll upload all files and folders as you said. Will keep you posted. Cross my fingers that it works!

    Thanks Esmi!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Password Protected Page’ is closed to new replies.