post type capabilities
-
Hi
i registered custom post type like this but in browser it says that you don’t have permission to create “taqrir”. whats the problem?
function Taqrir() { $labels = array(); $capabilities = array( 'edit_post' => 'edit_taqrir', 'read_post' => 'read_taqrir', 'delete_post' => 'delete_taqrir', 'edit_posts' => 'edit_taqrir', 'edit_others_posts' => 'edit_others_taqrir', 'publish_posts' => 'publish_taqrir', 'read_private_posts' => 'read_private_taqrir', ); $args = array( 'label' => 'Taqrir', 'description' => '', 'labels' => $labels, 'supports' => array( 'title', 'editor', 'comments' ), 'taxonomies' => array( 'post_tag'), 'hierarchical' => true, 'public' => true, 'show_ui' => true, 'show_in_menu' => true, 'menu_position' => 5, 'menu_icon' => 'dashicons-admin-customizer', 'show_in_admin_bar' => true, 'show_in_nav_menus' => true, 'can_export' => true, 'has_archive' => 'taqrir', 'exclude_from_search' => false, 'publicly_queryable' => true, 'capability_type' => $capabilities, 'map_meta_cap' => true, ); register_post_type( 'taqrir', $args ); } add_action( 'init', 'Taqrir', 0 );
Viewing 6 replies - 1 through 6 (of 6 total)
Viewing 6 replies - 1 through 6 (of 6 total)
- The topic ‘post type capabilities’ is closed to new replies.