PASSWORD PROTECT CHILDREN PAGES

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.

  • Is this a page?
  • Does this page have an ancestor page
  • If it does, does the ancestor page require password protection?
  • If it does, treat this page the same way you would treat the top level ancestor page.

Version 0.2 uses the $post->ancestors property and allows protection of grandchildren pages as well

Home