Administrator lost it’s role on CPT
-
I have created custom post type
add_action( 'init', 'oglasi_custom_post_type', 0 ); // Creating a Deals Custom Post Type function oglasi_custom_post_type() { $labels = array( 'name' => __( 'Oglasi' ), 'singular_name' => __( 'Oglas'), 'menu_name' => __( 'Oglasi'), 'parent_item_colon' => __( 'Roditelj Oglas'), 'all_items' => __( 'Svi Oglasi'), 'view_item' => __( 'Pregledaj Oglas'), 'add_new_item' => __( 'Dodaj Novi Oglas'), 'add_new' => __( 'Dodaj Nov'), 'edit_item' => __( 'Izmeni Oglas'), 'update_item' => __( 'Ažuriraj Oglas'), 'search_items' => __( 'Traži Oglas'), 'not_found' => __( 'Nije Pronađen'), 'not_found_in_trash' => __( 'Nije Pronađen U Obrisanim') ); $args = array( 'label' => __( 'oglasi'), 'description' => __( 'Vaši Oglasi'), 'labels' => $labels, 'supports' => array( 'title', 'editor', 'excerpt', 'author', 'thumbnail', 'revisions', 'custom-fields'), 'public' => true, 'hierarchical' => false, 'show_ui' => true, 'show_in_menu' => true, 'show_in_nav_menus' => true, 'show_in_admin_bar' => true, 'has_archive' => true, 'can_export' => true, 'exclude_from_search' => false, 'yarpp_support' => true, 'publicly_queryable' => true, 'capability_type' => 'post', 'capabilities' => array( 'edit_post' => 'edit_oglas', 'edit_posts' => 'edit_oglase', 'edit_others_posts' => 'edit_other_oglase', 'publish_posts' => 'publish_oglas', 'read_post' => 'read_oglas', 'read_private_posts' => 'read_private_oglase', 'delete_post' => 'delete_oglas' ), 'map_meta_cap' => false ); register_post_type( 'oglasi', $args ); }
After that I have created a new custom user role so it can post only on CPT but now both new role and administrator can not see the custom post type.
How do I make them see the custom post type?
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
- The topic ‘Administrator lost it’s role on CPT’ is closed to new replies.