I use this code to create a new custom post type, but the problem is that it shows the same categories of default posts. Is it possible have different categories for this custom post type?
function crear_tipo_agencias() {
$labels = array(
'name' => _x( 'Agencias', 'Post Type General Name', 'text_domain' ),
'singular_name' => _x( 'Agencia', 'Post Type Singular Name', 'text_domain' ),
'menu_name' => __( 'Agencias', 'text_domain' ),
'parent_item_colon' => __( 'Agencia Padre', 'text_domain' ),
'all_items' => __( 'Agencias', 'text_domain' ),
'view_item' => __( 'Ver Agencia', 'text_domain' ),
'add_new_item' => __( 'Añadir Agencia Nueva', 'text_domain' ),
'add_new' => __( 'Añadir', 'text_domain' ),
'edit_item' => __( 'Editar Agencia', 'text_domain' ),
'update_item' => __( 'Actualizar', 'text_domain' ),
'search_items' => __( 'Buscar Agencias', 'text_domain' ),
'not_found' => __( 'Agencias no encontradas', 'text_domain' ),
'not_found_in_trash' => __( 'Agencias no encontradas en Papelera', 'text_domain' ),
);
$rewrite = array(
'slug' => 'agencia',
'with_front' => true,
'pages' => true,
'feeds' => true,
);
$args = array(
'label' => __( 'agencia', 'text_domain' ),
'description' => __( 'Agencias relacionadas', 'text_domain' ),
'labels' => $labels,
'supports' => array( 'title', 'editor', 'comments', 'thumbnail', 'custom-fields'),
'taxonomies' => array( 'category', 'post_tag' ),
'hierarchical' => false,
'public' => true,
'show_ui' => true,
'show_in_menu' => true,
'show_in_nav_menus' => true,
'show_in_admin_bar' => true,
'menu_position' => 5,
'menu_icon' => site_url().'/wp-content/themes/Avada/images/iconnoticias.png',
'can_export' => true,
'has_archive' => 'agencias',
'exclude_from_search' => false,
'query_var' => 'agencias',
'rewrite' => $rewrite,
'capability_type' => 'post',
);
register_post_type('agencias', $args);
}
add_action('init', 'crear_tipo_agencias', 0);