Or, embed this snippet using GenerateWP WordPress Plugin.

Download

Clone

softcategory

// Register Custom Taxonomy
function my_custom_taxonomy() {

	$labels = array(
		'name'                       => _x( '软件分类', 'Taxonomy General Name', 'text_domain' ),
		'singular_name'              => _x( '软件分类', 'Taxonomy Singular Name', 'text_domain' ),
		'menu_name'                  => __( '软件分类', 'text_domain' ),
		'all_items'                  => __( '所有软件分类', 'text_domain' ),
		'parent_item'                => __( '该软件分类的父级', 'text_domain' ),
		'parent_item_colon'          => __( '该软件分类的父级', 'text_domain' ),
		'new_item_name'              => __( '新建软件分类', 'text_domain' ),
		'add_new_item'               => __( '添加软件分类', 'text_domain' ),
		'edit_item'                  => __( '编辑软件分类', 'text_domain' ),
		'update_item'                => __( '更新软件分类', 'text_domain' ),
		'view_item'                  => __( '查看软件分类', 'text_domain' ),
		'separate_items_with_commas' => __( 'Separate Items with commas', 'text_domain' ),
		'add_or_remove_items'        => __( '新建或删除软件分类', 'text_domain' ),
		'choose_from_most_used'      => __( 'Choose From Most Used', 'text_domain' ),
		'popular_items'              => __( '最受欢迎的软件分类', 'text_domain' ),
		'search_items'               => __( '搜索软件分类', 'text_domain' ),
		'not_found'                  => __( '没有找到相关软件分类', 'text_domain' ),
		'no_terms'                   => __( '没有软件分类', 'text_domain' ),
		'items_list'                 => __( '软件分类列表', 'text_domain' ),
		'items_list_navigation'      => __( 'Items list navigation', 'text_domain' ),
	);
	$rewrite = array(
		'slug'                       => 'softcategory',
		'with_front'                 => true,
		'hierarchical'               => true,
	);
	$args = array(
		'labels'                     => $labels,
		'hierarchical'               => true,
		'public'                     => true,
		'show_ui'                    => true,
		'show_admin_column'          => true,
		'show_in_nav_menus'          => true,
		'show_tagcloud'              => true,
		'rewrite'                    => $rewrite,
	);
	register_taxonomy( 'softcategory', array( 'postsoft' ), $args );

}
add_action( 'init', 'my_custom_taxonomy', 0 );