Password protecting WordPress pages

I recently had a client who wanted a password protected section of his website. Didn’t need to be too complicated, just a simple, single password that would be shared amongst everyone who wanted to access a series of pages.

Now for those that don’t know, password protecting a post or page in WordPress, is very straightforward? A standard, out-of-the-box feature that comes as part of the core-code. However, any child pages of that parent page AREN’T password protected. Hmmm, not so useful.

In walks this neat little plugin which adds that extra level of functionality which to my mind should be part of the standard core WordPress code.

However, it doesn’t actually quite work with the latest version of WordPress and throws up some rather horrible error messages. So a quick investigation reveals a new line of code which I added and fixed what is essentially a very simple, yet useful plugin.

Nice one!

© 2019 Duncan Arrow Limited
  Website by duncanarrow.com