One of the oft-asked support questions I get is how to allow a user to edit posts/pages but not create new ones. WordPress actually allows for this with custom post types, but for backward-compatibility reasons, it’s not possible out of the box with posts and pages.
After sharing bits and pieces of code enough through the support forums, it made sense to turn this into an add-on plugin for Members.
What does the plugin do?
Members – Core Create Caps creates two new capabilities:
create_posts– Permission to create new posts.
create_pages– Permission to create new pages.
By default, creating posts and pages in WordPress is directly tied to the
edit_pages capabilities, respectively. However, those capabilities also control who can edit posts and pages. There’s no separation between the creating and editing permissions.
In a nutshell, this plugin splits the “create” capabilities away from the “edit” capabilities.
There’s a couple of other things it does, such as register the new capabilities with the Members plugin and fix a bug in WP’s admin menu handling system. But, the core of the plugin is to provide more flexible control over managing posts/pages on sites that need it.
I hate to release a plugin with an existing bug, but there’s little I can do about it at this point because this bug exists in core WordPress. However, the plugin itself is useful even with the WordPress issue.
Currently, this plugin separates out the
create_pages caps. However, you cannot simply give those caps to a role without also granting the
edit_pages caps. Of course, most people who create posts/pages will need the ability to edit them anyway.
Where this plugin shines is when you give users the ability to
edit_pages but not the ability to create. This is particularly useful when you have an editor or admin who assigns specific posts/pages to specific users to edit (most common use case).
Get the plugin
I hope you enjoy the plugin. And, if you have any other ideas for Members plugin add-ons, feel free to share in the comments.