Skip to main content
1 of 2

Custom Post Type Category On Admin

I've created custom post type called 'video' and added category support. The problem is when i go to category of custom post type, it shows normal post's categories as well. I wanna seperate them How can i fix this?

custom-post-type php file;

add_action( 'init', 'register_cpt_video' );

function register_cpt_video() {

$labels = array(
    'name' => __( 'Videolar', 'video' ),
    'singular_name' => __( 'Video', 'video' ),
    'add_new' => __( 'Yeni Video Ekle', 'video' ),
    'add_new_item' => __( 'Yeni Video Ekle', 'video' ),
    'edit_item' => __( 'Video Düzenle', 'video' ),
    'new_item' => __( 'Yeni Video', 'video' ),
    'view_item' => __( 'Video Görüntüle', 'video' ),
    'search_items' => __( 'Video Arama', 'video' ),
    'not_found' => __( 'Herhangi bir video bulunamadı', 'video' ),
    'not_found_in_trash' => __( 'Herhangi bir video bulunmadı', 'video' ),
    'parent_item_colon' => __( 'Ebeveyn Video', 'video' ),
    'menu_name' => __( 'Videolar', 'video' ),
);

$args = array(
    'labels' => $labels,
    'hierarchical' => false,
    'description' => 'Video Galeri içeriklerinizi buradan giriniz.',
    'supports' => array( 'title', 'editor', 'excerpt', 'author', 'thumbnail', 'trackbacks', 'custom-fields', 'comments', 'revisions', 'page-attributes' ),
    'taxonomies' => array( 'category', 'post_tag' ),
    'public' => true,
    'show_ui' => true,
    'show_in_menu' => true,
    'menu_position' => 5,
    'menu_icon' => 'dashicons-video-alt2',
    'show_in_nav_menus' => true,
    'publicly_queryable' => true,
    'exclude_from_search' => false,
    'has_archive' => false,
    'query_var' => true,
    'can_export' => true,
    'rewrite' => true,
    'capability_type' => 'post'
);

register_post_type( 'video', $args );

}