Why does WP not redirect back to password protected page?

Why does WP not redirect back to password protected page?

I am using WP 3.5.1 and I have found out that after a successful login to a password protected page, WP won’t redirect back. This is because referrer is empty. So I have modified page login script to have hidden “_wp_http_referer” field in form. After that, login redirects back to page normally.

What happens when you post on a password protected page?

This mimics the form posting that would normally happen when a password-protected page is visited for the first time. There, the client would be prompted for the password to view the post content, and once it was given a cookie is created to allow future access to the content.

How can I get a password for a post?

We can use that to query the db for any posts that have that password assigned and get the post info based on that. From there, we can redirect to the password-protected post. The OP stated that a custom login form would be used for clients to enter their special password.

How to redirect someone to the appropriate CPT page?

When someone clicks this button, I want them to be presented with a password form where they can enter the password we sent them in the email. Based on the password they enter, they’ll be redirected to the appropriate CPT page. Anyone have any ideas on how I can go about this?

How to password protect a page or directory on your website?

Save the code above as default.html or index.html on your website and redirect to the page you want to password-protect if the password is entered correctly.  The main disadvantage of this is that the password is easily visible. You can save the Javascript as a separate file and include it the HTML but anyone can easily view the Javascript file.

Is there a custom login form for password protected post?

From there, we can redirect to the password-protected post. The OP stated that a custom login form would be used for clients to enter their special password. I’m assuming that form is created and can use a GET request to send the password since it’s already plaintext.