WordPress.org

Ready to get started?Download WordPress

Forums

Role Scoper
[resolved] Restrict certain roles to adding only specific post types (11 posts)

  1. pealo86
    Member
    Posted 3 years ago #

    I'm wondering if this plugin makes it possible to achieve this?

    I have the post type 'company' and want users with the role 'contributor' to only be able to manage company posts, but not normal posts (or any other custom posts).

    I've installed the plugin and tried modifying some of the settings but have been unsuccessful. There appears to be a vast amount of options and I can't think of any other combinations that would get it to work.

    Any help would be great :D

  2. kevinB
    Member
    Plugin Author

    Posted 3 years ago #

    To prevent your Contributors from creating normal posts, you can either use a simple role editor (like Capability Manager) to remove their edit_posts capability or go to Restrictions > Categories and set a default restriction on the Post Contributor role ("defaults for all categories")

    To enable Contributors to create posts of the "company" type, go to Roles > General and assign the "Company Contributor" role to the group [WP Contributor].

  3. pealo86
    Member
    Posted 3 years ago #

    Thanks, but if I remove the 'edit_posts' capabitlity from contributors, it prevents them from editing custom posts also.

    I've tried several other plugins and had the same problem with each :(

    Can't seem to find 'Roles > General' or 'Restrictions > Categories' is this in the Capability Manager plugin?

  4. pealo86
    Member
    Posted 3 years ago #

    Ohhh wait I can see you were talking about Role Scoper for those bits.

    Hmmm I've tried restricting the Contributor role under 'restrictions > categories' but it doesn't appear to make any difference?

    Also, how would I go about setting up the 'Company Contributor' role?

    Thanks

  5. kevinB
    Member
    Plugin Author

    Posted 3 years ago #

    Did you restrict the Post Contributor role for all categories? If so, Contributors should no longer have access to "Edit Posts" or "Add New Post"... unless they also have a Category Role.

    What do you mean by "setting up the Company Contributor role"? It should be available for role assignment if your custom post type is registered properly. If you are doing it yourself, be sure to specify early execution:

    add_action( 'init', 'my_type_registration', 1 );
  6. pealo86
    Member
    Posted 3 years ago #

    Thanks again,
    Sorry for the late reply. I have tried setting 'Post Contributor' to 'Restricted' under 'DEFAULTS for all Categories' however I am still able to add / edit normal posts when logged in as a contributor.

    Do I need to check something else? Could it be that I may have messed up my WP installation with other plugins and might have to start with a fresh install perhaps?

  7. pealo86
    Member
    Posted 3 years ago #

    Just a quick update, I have tried restricting roles like so in the following image:
    http://twitpic.com/4kfbvk

    I used the menu under Restrictions/Posts however I am still able to add / edit posts when logged in as a contributor, is this how it should be?

  8. kevinB
    Member
    Plugin Author

    Posted 3 years ago #

    Post Restrictions only pertain to existing posts. To prevent a user from creating new posts, you will need to remove the edit_posts capability from their WordPress role.

  9. Chineseand
    Member
    Posted 2 years ago #

    Hi,

    I had Role Scoper installed on a site, and uninstalled it to run another plugin. I was able to "turn off" the "add new/post" and the "comments" links from the front end admin bar before I uninstalled it, but now on another site I haven't been able to deactivate adding posts for authors. (my site uses gravity forms to post from front end,so I don't want the users to see the "add new" option at the top which would take them to the back end.) Can you point me in the right direction for setting that scenario up? I have tried several settings, but I think I'm getting turned around..

    thanks!

  10. kevinB
    Member
    Plugin Author

    Posted 2 years ago #

    Use a simple role editor such as Capability Manager to remove the edit_posts capability from the WP Author role. Role Scoper can still be used to grant editing permissions on specific posts/pages if desired.

  11. Chineseand
    Member
    Posted 2 years ago #

    Thanks!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic