We currently have about 50 pages, each of which I want a user (eg, bob, rob, smith) to be able to edit only 1 page. For example, bob & smith each have their own page. I do not want bob to be able to edit smith’s page. I want bob to ONLY be able to edit bob’s page. I don’t care if he can see other pages.
Looking through the user roles, I don’t see a way to currently to do this- I only see how to allow restrict access on a global scale.
Are their any plugins to help restrict edit access per user, or roles restricted to editing specific pages and I can just add 1 user per role? Or was there a way to do this with default settings I missed.
The Role Scoper plugin can enable this.
You can add this to your
functions.php
file in your template to allow the user to edit pages that they have created and manage media. Just specify their$user_id
(i.e. 27):You can find a specific user’s
$user_id
from the URL when you edit a specific user from the WordPress admin page.See the full list of WordPress capabilities.
If you’d rather modify the built in role
contributor
to allow all users with thecontributor
role to modify the pages they created:Role Scope is very powerful, but I think it’s overkill for this. If you set Bob and Smith to have the role of Author (one of the default roles), they’ll only be able to edit their own posts.
You can also just edit the WP table. Seemed like phpAdmin was going to be a quicker way to go.
The table is
Search for the user_id, change the value for
and set it to something like
I found http://www.unserialize.me/ to be a help in making sure I had the serialization correct (and I expect there are other sites as well)