Ich habe jetzt mal testweise einen neuen Post Type angelegt:
add_action( 'init', 'register_cpt_test' );
function register_cpt_test() {
$labels = array(
'name' => _x( 'Tests', 'test' ),
'singular_name' => _x( 'Test', 'test' ),
'add_new' => _x( 'Add New', 'test' ),
'add_new_item' => _x( 'Add New Test', 'test' ),
'edit_item' => _x( 'Edit Test', 'test' ),
'new_item' => _x( 'New Test', 'test' ),
'view_item' => _x( 'View Test', 'test' ),
'search_items' => _x( 'Search Tests', 'test' ),
'not_found' => _x( 'No tests found', 'test' ),
'not_found_in_trash' => _x( 'No tests found in Trash', 'test' ),
'parent_item_colon' => _x( 'Parent Test:', 'test' ),
'menu_name' => _x( 'Tests', 'test' ),
);
$args = array(
'labels' => $labels,
'hierarchical' => false,
'supports' => array( 'title', 'editor' ),
'public' => true,
'show_ui' => true,
'show_in_menu' => true,
'show_in_nav_menus' => true,
'publicly_queryable' => true,
'exclude_from_search' => false,
'has_archive' => true,
'query_var' => true,
'can_export' => true,
'rewrite' => true,
'capability_type' => 'test',
'map_meta_cap' => true
);
register_post_type( 'test', $args );
}
Alles anzeigen
Im Rolemanager erscheint jetzt zwar die Berechtigung "Test" aber angezeigt wird mir dieser dennoch nicht im Menü links. Hab jetzt schon mehrere Tutorials zum Thema durchforstet, scheint alles zu passen, aber naja...
Wo ist mein Fehler?