Password Protect Children Pages

By Glenn  |  May 23rd, 2009  |  Published in Projects, WordPress Plugins  |  7 Comments

This plugin does one thing. If a page that is password protected has children pages, all children pages will be protected with the same password. 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.

The following logic is invoked whenever the_content or the_excerpt is called from your theme.

  1. Is this a page?
  2. Does this page have a parent page
  3. If it does, does the parent page require password protection?
  4. If it does, treat this page the same way you would treat the parent page.

Download here until it gets approved at wordpress.org

Bookmark and Share

Responses

  1. Jens says:

    June 15th, 2009 at 4:28 am (#)

    Hi, I installed your plugin (WP 2.8) but it doesn’t work. Is there an update for the new version of wordpress?

    I would be glad if you can help me, because your small plugin would be the perfect solution for my site :-)

    Thanks a lot!
    Jens

  2. webangela says:

    June 25th, 2009 at 11:36 pm (#)

    how do I emplement this. sorry for a stupid question. it is just what i need. thanks again!

  3. Simon says:

    August 26th, 2009 at 8:20 am (#)

    I’ve implemented a “Members Only Area” on my website where the top page is password-protected, and using this plugin all sub-pages are now automatically protected too.

    Works exactly as I hoped it would, thanks!

  4. Gareth says:

    October 18th, 2009 at 8:17 pm (#)

    Hi there,

    Thanks for the plugin – sadly it only works with child pages not grandchild pages.

    Is there someway this could be added using get_post_ancestors rather than post->parent?

    Cheers,
    Gareth.

  5. Big D says:

    October 23rd, 2009 at 12:38 am (#)

    I’d like to use this for my website under construction, but a) should I update to newest version of WordPress first? and b) what are some responses to common glitches?

  6. Big D says:

    October 23rd, 2009 at 1:01 am (#)

    I downloaded this into my website’s admin and it doesn’t even show up anywhere. What happened? Does it even show up? How can I use it if there’s no control panel anywhere?

  7. Glenn says:

    October 23rd, 2009 at 9:43 am (#)

    What kind of interface do you need? I didn’t build any options into it. If you password protect a page, its child gets password protected too. Pretty simple.

Leave a Response