Display input to enter password for password protected posts

Hi,

I was wondering if someone can point me in the right direction to add a password input field to be able to view posts that are password protected. Now the posts are blank that are password protected. Thanks for any help. If there is any plugin to install for wordpress that would do the trick for rest api connections that would also be useful.

Hi all, just wanted to check back to see if anyone here knows how to accomplish this?
This is one of few steps there is missing to be able to complete the website using Frontity.
I just need help (the steps needed) to add an input to the posts that are password protected and enable them so one can input the password and hit enter and the post will be displayed normally within Frontity. Has anyone been able to successfully do this with frontity?

Hi all, just wanted to check back and see if anyone can help me with this.

I have not done this specific thing but can give you some general directions.

  1. Create a form in your front-end that has the password field.
  2. On submit, call the WP api to authenticate, if all is good create JWT for the user and send it back
  3. Now you can use the JWT to query private endpoints.
  4. Profit :slight_smile:

Thats a very simple overview. Hopefully it gives you some idea on how to go forward. You can also check this: @frontity/wp-source - API Reference

Thank you for your answer. I’m going to give it a try. I’m quite new to react/frontity but I’m going to try a few things :slight_smile: I have learned quite a lot through trial and error but this is one of the things left to figure out.