Tom Maitland

Creates digital things at Agency. WordPress developer. Web designer. Communicates for UN Youth Australia.

Restrict Page Parents Launched!

31 March 2013

Restrict Page Parents started here on the blog as a quick bandaid plugin designed to solve a small issue within the new UN Youth Australia website. Users with only the permission to edit pages owned by them, could add or move their pages under a parent page they did not own, creating issues around page hierarchy and menus within the site. They could also not set a parent page, meaning their page would be on the base level with the main site pages.

This of course wasn’t ideal, and the script I created kind of solved it, but not really.

A few months later I got some emails from some people who’d found the hack-plugin and found it useful, although massively buggy. They also found that there needed to be more control over the restrictions set by the plugin.

I decided to do it properly, if I had this issue surely others who were using WordPress as a CMS were to. Restrict Page Parents is a very lightweight, niche plugin, but it does what it does well. There’s options for the users and/or roles to restrict, and the restrictions to put in place. It does those restrictions properly through WordPress actions and hooks (not PHP find & replace), and also places the restrictions on Quick Edit.

Check it out on your WordPress site, and let me know if you run into any bugs. If you feel like contributing to the code (or I’ve made a horrendous mistake somewhere) then there’s also a GitHub project.