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.
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:
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:
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:
And the result is a simple way for my client to navigate their private section on my site:
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/