Or, embed this snippet using GenerateWP WordPress Plugin.

Download

Clone

Project Type Taxonomy

if ( ! function_exists( 'themo_project_type' ) ) {

// Register Custom Taxonomy
function themo_project_type() {

	$labels = array(
		'name'                       => _x( 'Project Types', 'Taxonomy General Name', 'THEMO_TEXT_DOMAIN' ),
		'singular_name'              => _x( 'Project Type', 'Taxonomy Singular Name', 'THEMO_TEXT_DOMAIN' ),
		'menu_name'                  => __( 'Project Types', 'THEMO_TEXT_DOMAIN' ),
		'all_items'                  => __( 'All Project Types', 'THEMO_TEXT_DOMAIN' ),
		'parent_item'                => __( 'Parent Project Type', 'THEMO_TEXT_DOMAIN' ),
		'parent_item_colon'          => __( 'Parent Project Type:', 'THEMO_TEXT_DOMAIN' ),
		'new_item_name'              => __( 'New Project Type Name', 'THEMO_TEXT_DOMAIN' ),
		'add_new_item'               => __( 'Add New Project Type', 'THEMO_TEXT_DOMAIN' ),
		'edit_item'                  => __( 'Edit Project Type', 'THEMO_TEXT_DOMAIN' ),
		'update_item'                => __( 'Update Project Type', 'THEMO_TEXT_DOMAIN' ),
		'separate_items_with_commas' => __( 'Separate Project Type with commas', 'THEMO_TEXT_DOMAIN' ),
		'search_items'               => __( 'Search Project Types', 'THEMO_TEXT_DOMAIN' ),
		'add_or_remove_items'        => __( 'Add or remove project type', 'THEMO_TEXT_DOMAIN' ),
		'choose_from_most_used'      => __( 'Choose from the most project types', 'THEMO_TEXT_DOMAIN' ),
		'not_found'                  => __( 'Not Found', 'THEMO_TEXT_DOMAIN' ),
	);
	$rewrite = array(
		'slug'                       => 'project-type',
		'with_front'                 => true,
		'hierarchical'               => false,
	);
	$args = array(
		'labels'                     => $labels,
		'hierarchical'               => false,
		'public'                     => true,
		'show_ui'                    => true,
		'show_admin_column'          => true,
		'show_in_nav_menus'          => true,
		'show_tagcloud'              => true,
		'rewrite'                    => $rewrite,
	);
	register_taxonomy( 'themo_project_type', array( 'themo_portfolio' ), $args );

}

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

}