Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

In my plugin I have created a custom post type and defined capabilities for both the subscriber and the administrator role.

When I go into the backend and look at the capabilities that are in the list of capabilities for the administrator role, all the capabilities I added are checked.

However if I login as admin and try to move a post of type 'pp_zoekertje' to trash, wordpress tells me I am not allowed to do so.

I have of course, searched on stackexchange and various other sites but the only solutions I can find are telling me to do exactly what I am already doing.

Any help is appreciated.

function create_pp_zoekertje_post_type(){
        'labels' => array(
            'name' => 'Zoekertjes',
            'singular_name' => 'Zoekertje',
            'add_new' => __('Nieuw Zoekertje'),
            'add_new_item' => __( 'Nieuw Zoekertje' ),
            'edit' => __( 'Bewerk' ),
            'edit_item' => __( 'Bewerk Zoekertje' ),
            'new_item' => __( 'Nieuw Zoekertje' ),
            'view' => __( 'Bekijk' ),
            'view_item' => __( 'Bekijk Zoekertje' ),
            'search_items' => __( 'Zoek Zoekertjes' ),
            'not_found' => __( 'Geen zoekertjes gevonden' ),
            'not_found_in_trash' => __( 'Geen zoekertjes gevonden in prullenbak' ),
        'public' => true,
        'has_archive' => true,
        'show_ui' => true,
        'publicly_queryable' => true,
        'exclude_from_search' => false,
        'hierarchical' => false,
        'query_var' => true,
        'supports' => array(
        'map_meta_cap' => true,
        'capability_type' => 'pp_zoekertje',
        'capabilities' => array(
            'edit_post' => 'edit_pp_zoekertje',
            'edit_posts' => 'edit_pp_zoekertjes',
            'edit_others_posts' => 'edit_others_pp_zoekertjes',
            'publish_posts' => 'publish_pp_zoekertjes',
            'edit_published_posts' => 'edit_published_pp_zoekertjes',
            'read_post' => 'read_pp_zoekertje',
            'read_private_posts' => 'read_private_pp_zoekertjes',
            'delete_post' => 'delete_pp_zoekertje',
            'delete_others_posts' => 'delete_others_pp_zoekertjes'
//            'taxonomies' => array('pp_zoekertje_taxonomy','category'),

$subscriber_role = get_role('subscriber');

function poppunt_classifieds_search_Init() {
    if (!is_admin()) {
        wp_enqueue_script( 'poppunt-classifieds-handlebars', plugins_url( '/js/handlebars.js', __FILE__ ));
add_action('init', 'poppunt_classifieds_search_Init');

add_action('admin_init', 'plugin_admin_init');
function plugin_admin_init(){
    $administrator_role = get_role('administrator');

    register_setting( 'pp_options', 'pp-options', 'pp_plugin_options_validate' );

    add_settings_section('pp_options_main', 'Algemene instellingen', 'pp_options_main_output', 'pp_options_menu');

        __('Pagina met invulformulier voor zoekertje (toevoegen/bewerken)'),

        __('Mijn zoekertjes pagina'),
share|improve this question

Your Answer


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

Browse other questions tagged or ask your own question.