Extending password protected posts with name and email

If you want to add name email or any additional fields in addition to password for protected posts, see the steps below:

Now to the validation

What you want to do with the information (name, email) is up to you. I wanted to be notified who logged in to view the post so I wrote a email notification as follows:

Leave a Reply

Your email address will not be published.