Password Protected Page
-
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)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Password Protected Page’ is closed to new replies.