custom post type with role Vendor
First you have to passed two additional arguments into the register_post_type() function. capability_type map_meta_cap Then, You can add capability using add_cap(); function. register_post_type( ‘acme_product’, array( ‘labels’ => array( ‘name’ => __( ‘Products’ ), ‘singular_name’ => __( ‘Product’ ) ), ‘public’ => true, ‘has_archive’ => true, ‘capability_type’ => array(‘acme_product’,’acme_products’), ‘map_meta_cap’ => true, ) ); add_action(‘admin_init’,’vendor_role_caps’); function … Read more