WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

If I create a custom post type and want to create custom capabilities for that, how do I do this? For example, I want to let my Editors to edit and create and delete posts and pages, but not the custom post type I've created? I also want to have the possibility to change the capabilities later with this plugin: http://wordpress.org/extend/plugins/user-role-editor/ (see the screens of the available capabilities: http://wordpress.org/extend/plugins/user-role-editor/screenshots/) I've done this by now this way:

global $wp_roles;

if(!isset($wp_roles)) {
    $wp_roles = new WP_Roles();

// add capability $cap to role $role
$roles = $wp_roles->get_names();
$wp_roles->add_cap('administrator', 'organize_matches');

But then even I as administrator am not able to save the custom post type (and yeah, I mentioned 'organize_matches' in the 'capabilities' argument when registering the custom post type). Really appreciate Your help!

share|improve this question
up vote 1 down vote accepted

Use 'capability_type' & 'capabilities' when you register_post_type().

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.