Change WordPress user roles and capabilities Forums How to or FAQ Capabilities in custom post types

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #4764
    RonM
    Participant

    We have a somewhat complex website with several custom post types. A number of capabilities are associated with Custom Post Types in general. Some of the specific CPTs have a subset associated with them, and different roles can be assigned to these different capabilities.

    However, other CPTs have no capabilities associated with them. There is no obvious way I can see that these can be added through URE, but perhaps I’m missing something. It seems that with no capabilities associated with the particular CPT, all the capabilities for CPTs in general are available, but can’t be varied by role.

    Advice appreciated.

    Ron

    #4769
    Vladimir
    Keymaster

    Custom post type definition includes a capability type parameter. If capability type is omitted, WordPress uses a default value ‘post’, the same as for the WP built-in post type ‘posts’. All such custom post types are protected by the same user capabilities set as WordPress uses for the ‘Posts’: edit_posts, delete_posts, etc.

    If you use some plugin to define custom post type you can input a unique capability type there.

    User Role Editor Pro has an option which forces all custom post type to use own capabilities set (Settings->User Role Editor->Additional Modules). Related capabilities are added to the administrator role automatically, but should be granted to other roles manually.

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.