title: How to separate custom post type categories to post categories
body: <p>I'm trying to separate the category lists for a specific post type "announcement" from the post categories.</p>
  
  <p>I want my announcement post type to have its own category list and not mix with the post category list</p>
  
  <p>Here's my code</p>
  
  <pre><code>function announcement_post_types() {
      register_post_type(
          'announcement',
          array(
              'labels' =&gt; array(
                  'name' =&gt; __( 'Announcements' ),
                  'singular_name' =&gt; __( 'announcement' ),
                  'menu_name' =&gt; __( 'Announcements' ),
                  'all_items' =&gt; __( 'All Announcements' ),
                  'view_item' =&gt; __( 'View Announcement' ),
                  'add_new_item' =&gt; __( 'New Announcement' ),
                  'add_new' =&gt; __( 'New Announcement' ),
                  'edit_item' =&gt; __( 'Edit Announcements' ),
                  'update_item' =&gt; __( 'Update' ),
                  'search_items' =&gt; __( 'Search' ),
                  'not_found' =&gt; __( 'Not Found' ),
                  'not_found_in_trash' =&gt; __( 'Not Found in Trash' ),
              ),
              'public' =&gt; true,
              'has_archive' =&gt; false,
              'rewrite' =&gt; array('slug' =&gt; 'announcement'),
              'menu_icon' =&gt; 'dashicons-admin-page',
              'supports' =&gt; array('title', 'editor', 'custom-fields')
          )
      );
      register_taxonomy(  
      'announcement_type',  
      'announcement',  // this is the custom post type(s) I want to use this taxonomy for
          array(  
              'hierarchical' =&gt; false,  
              'label' =&gt; 'News Types',  
              'query_var' =&gt; true,  
              'rewrite' =&gt; true  
          )  
      );  
      register_taxonomy_for_object_type('category', 'announcement');
  }
  add_action('init', 'announcement_post_types');
  </code></pre>