Last Updated: February 25, 2016
· cmdann

Make A Secure Page For WordPress

I recently wanted to secure a certain page against unregistered users. This obviously is not totally secure in that a user can just register for the website to get access (but that is the point in this case). This is a simple php template for WordPres that will only display the content if the user is logged in.

You can check out this on github:

You can also see it in action here:

When the user is logged in the content of the page is displayed. Otherwise an error is displayed and a log in form is provided for the user.

You can style the log in form however you like.