Creating Password Protected Pages and Areas in WordPress

Buffer this pageTweet about this on TwitterShare on FacebookShare on Google+Share on LinkedInEmail this to someone

Creating Private, Password Protected Sections on Your WordPress Site

I had a client recently who needed to create private, password-protected sections on her WordPress site. She wanted each of her clients to have a private page with information related to what they were working on together. Easy! Password-protection is an in-built feature of WordPress, in case you didn’t know.

When creating a page, you simply click “Edit” next to Visibility in the Publish box on the right. Choose “Password protected” and set the password as you choose.

Create a password protected page in  WordPress

But what if you want to create a series of pages for the same client to access? This would mean you would have to create a password for each new page which seems a little cumbersome.

UPDATE:  The plugin listed below “Password Protect Children Pages” is now out of date and languishing so I would now recommend using Smart Passworded Pages which provides the same functionality, but is more recently updated.

Fortunately there’s a handy plugin called Password Protect Children Pages  Smart Passworded Pages which will automatically password-protect the Child pages, ie. sub pages, of any password-protected Parent page. Additionally, if the correct password is entered on the parent page or any of its children pages, all related pages will be viewable to the user, so the experience is smooth for your client.
So the next question is, how to provide an easy way for your client to navigate the private area you have created for them?

A simple solution I found is courtesy of another plugin called List Pages Shortcode. As the name suggests, by placing a shortcode in any page or post, it will display a list of your pages.

If you were to use the basic shortcode:
[list-pages] You would display a list of ALL your pages. Of course you only want to display the pages for that particular client or section.

So instead use the shortcode:
[child-pages]

to output the subpages you have created. You can also modify the order the pages are displayed in. For example, the following will output the child pages with the newest first:
[child-pages sort_column=”post_date&show_date=created”]

As an example I created a main/Parent page for Client A, with 2 subpages. On the Parent page for client A, I use the short code plugin:

WordPress plugin - list pages shortcode

 

And the result is a simple way for my client to navigate their private section on my site:

WordPress - Password Protected Pages/Sections

 

In addition to private client pages, what else might you use this for on your site?

*header image courtesy: http://www.flickr.com/photos/holster/195031415/

Buffer this pageTweet about this on TwitterShare on FacebookShare on Google+Share on LinkedInEmail this to someone
Weekly WordPress Tips To Your Inbox
+ Get 50% Off The Beginner's Guide To SEO Ebook!

Lucy Beer - WebTrainingWheels WordPress TrainingDo you need help with WordPress from a professional? I can cut your learning time in half (at least!) by teaching you exactly what you need to know for your purposes. Whether you are just getting started or want to take your skills to the next level, I'll give you the customized training you need.

This Post Has 14 Comments

  1. Kevin

    How do you customize the Password Protected screen????

  2. Taimoor

    How can we make certain part of the post password protected?

    1. LucyBeer

      Sounds like you'll need something like the "Members" plugin by Justin Tadlock

  3. LucyBeer

    For all those that let me know that the plugin Password Protect Children Pages was out of date – thanks! I have updated the post and now recommend "Smart Passworded Pages"

  4. brennen

    any way now to kick those over to the sidebar? i want the sub pages hidden until the password in entered. but i dont want them right there on top. I cant get anything else to work.

  5. Andreas

    Hi Lucy,
    what if you have htaccess protection installed in the admin folder? I discovered that every password protected page or post asks for the username and password of the htaccess protected folder first followed by the specific password for a page or a post. Obviously wordpress make use of the login functionality even in case of a simple page/post password where no user login is required.
    Is there a plugin that can protect areas of a page or post independently from the wp "password system"? Would be great if you can share any knowledge. Thanks!

  6. Peter

    Just read your post on Creating Password Protected Pages in WP. When I found the plugin you mentioned – Password Protect Children's Pages – I got the following message: "This plugin hasn't been updated in over 2 years. It may no longer be maintained or supported and may have compatibility issues when used with more recent versions of WordPress." I'm a real novice at this, so I don't want to do anything that will backfire on me. Any thoughts?

    1. Mark

      Peter – did you find an alternative to Password Protect Children's Pages? I notice you have a password protected section on your site so I am guessing you either went ahead with the unsupported plugin or found another way?

  7. Jeremy

    Hi !

    I find your blog absolutely interesting. And I aalso have a question which is a bit related to this topic so if you prefer you can answer by email directly.

    I have a blog, I created a new page for my online product and I would like to give each of my clients an access code, password. Each one of them a unique username and password to get to my product. I could manage to create a global passsword so I give the same to everyone but how can I create a different one for each of my customers ?
    I appreciate your time and help and thanks in advance.

    1. Sherissa R

      Did you find a solution for this setup?

  8. Mark

    I have a client that wants their WordPress site to have three areas. One unprotected, one for group A (dependent on permission to a Google Group A) and one for group B(dependent on permission to A Google Group B). Members will first get into A and then move to B. People who are in B can also see things that are in “A” and “B” areas but “A” folks should not be able to be able to see “B” area until they are in group B. If it is easier then B will see B only and A will see A only.

    ~M

    1. LucyBeer

      Hi Mark – Sounds like you will need a more robust membership solution. You could look at the "Members" plugin by Justin Tadlock, but you may also look at s2 Member which has even more capabilities.

  9. markus

    Hi Lucy,
    this afternoon I spent several hours checking out plugins, reading how-tos, activating and finally deactivating one after the other – until I found your page: exactly what I was looking for – works simple and clean. You made my day – thank you!

  10. Michael

    Great find – thank you!!

Leave a Reply

Your email address will not be published. Required fields are marked *