Or, embed this snippet using GenerateWP WordPress Plugin.

Download

Clone

Cyberscience White Paper Category

if ( ! function_exists( 'cs_white_paper_taxonomy' ) ) {

// Register Custom Taxonomy
function cs_white_paper_taxonomy() {

	$labels = array(
		'name'                       => _x( 'White Paper Categories', 'Taxonomy General Name', 'cyberscience' ),
		'singular_name'              => _x( 'White Paper Category', 'Taxonomy Singular Name', 'cyberscience' ),
		'menu_name'                  => __( 'White Paper Category', 'cyberscience' ),
		'all_items'                  => __( 'All Categories', 'cyberscience' ),
		'parent_item'                => __( 'Parent Category', 'cyberscience' ),
		'parent_item_colon'          => __( 'Parent Category:', 'cyberscience' ),
		'new_item_name'              => __( 'New Category Name', 'cyberscience' ),
		'add_new_item'               => __( 'Add New Category', 'cyberscience' ),
		'edit_item'                  => __( 'Edit Category', 'cyberscience' ),
		'update_item'                => __( 'Update Category', 'cyberscience' ),
		'separate_items_with_commas' => __( 'Separate categories with commas', 'cyberscience' ),
		'search_items'               => __( 'Search Categories', 'cyberscience' ),
		'add_or_remove_items'        => __( 'Add or remove categories', 'cyberscience' ),
		'choose_from_most_used'      => __( 'Choose from the most used categories', 'cyberscience' ),
		'not_found'                  => __( 'Not Found', 'cyberscience' ),
	);
	$rewrite = array(
		'slug'                       => 'paper-category',
		'with_front'                 => true,
		'hierarchical'               => false,
	);
	$args = array(
		'labels'                     => $labels,
		'hierarchical'               => true,
		'public'                     => true,
		'show_ui'                    => true,
		'show_admin_column'          => true,
		'show_in_nav_menus'          => true,
		'show_tagcloud'              => true,
		'query_var'                  => 'paper-category',
		'rewrite'                    => $rewrite,
	);
	register_taxonomy( 'cs_paper_category', array( 'cs_white_paper' ), $args );

}

// Hook into the 'init' action
add_action( 'init', 'cs_white_paper_taxonomy', 0 );

}