Role for edit a single post

4 Replies ·

  1. Hi,
    I install member in another wordpress theme and I need role for edit a single post.
    At the end of the page in back and I find only a cech for give to some role permission to see the page in front end but not for edit it in bakend it is possible?

  2. Justin Tadlock

    With the Members plugin, no, this isn’t possible. WordPress really doesn’t have permissions on this level.

    However, it is possible to custom code this, especially if you only want to do this for one post. If you want to do it for many posts, you really need to hire someone to build a custom plugin.

    In this particular situation, it’s often better to handle this by User ID or Capability rather than Role. Handling stuff by role really isnt recommended anyway because roles aren’t permissions. But, it really depends. Here’s some stuff I need to know:

    • What’s the post ID?
    • If this is just a few users, what are their user IDs?
    • If this is many users, can you add a custom capability for editing this post to their role(s)?
    • Should users with the `edit_others_posts` capability (such as the administrator) still be allowed to edit this post?
  3. silviamato

    hi, thanks for your answer,
    I was hoping it was easier than this
    I do not like writing code and do not know where to go to find the post ID … like user ID… where I can find it?

    I need only give to each user of my site the capability to edit only a post the
    but I did not understand what you suggest me

  4. Justin Tadlock

    To do something like this, you should get a little familar with editing code. You should be at least comfortable enough to do some copying and pasting. I also highly recommend reading and following this tutorial that I wrote:

    That’s pretty important because you definitely need to set up a custom plugin for yourself to be able to do the things you’ll need to do for this project.


    You can find the IDs for posts and users by editing them in the admin. If you click to edit the post, the URL will look something like `localhost/wp-admin/post.php?post=2528&action=edit`. The `2528` is the post ID.

    It’s the same with users. The URL will look like `localhost/wp-admin/user-edit.php?user_id=7832`. The `7832` would be the user ID.