Or, embed this snippet using GenerateWP WordPress Plugin.

Download

Clone

Domain Extensions Group

if ( ! function_exists( 'dw_domain_types' ) ) {

// Register Custom Taxonomy
function dw_domain_types() {

	$labels = array(
		'name'                       => _x( 'Domain Types', 'Taxonomy General Name', 'dw_domain_types' ),
		'singular_name'              => _x( 'Domain Type', 'Taxonomy Singular Name', 'dw_domain_types' ),
		'menu_name'                  => __( 'Domain Type', 'dw_domain_types' ),
		'all_items'                  => __( 'All Domain Types', 'dw_domain_types' ),
		'parent_item'                => __( 'Parent Domain Type', 'dw_domain_types' ),
		'parent_item_colon'          => __( 'Parent Domain Type:', 'dw_domain_types' ),
		'new_item_name'              => __( 'New Domain Type Name', 'dw_domain_types' ),
		'add_new_item'               => __( 'Add New Domain Type', 'dw_domain_types' ),
		'edit_item'                  => __( 'Edit Domain Type', 'dw_domain_types' ),
		'update_item'                => __( 'Update Domain Type', 'dw_domain_types' ),
		'view_item'                  => __( 'View Domain Type', 'dw_domain_types' ),
		'separate_items_with_commas' => __( 'Separate Domain Types with commas', 'dw_domain_types' ),
		'add_or_remove_items'        => __( 'Add or remove Domain Types', 'dw_domain_types' ),
		'choose_from_most_used'      => __( 'Choose from the most used', 'dw_domain_types' ),
		'popular_items'              => __( 'Popular Domain Types', 'dw_domain_types' ),
		'search_items'               => __( 'Search Domain Types', 'dw_domain_types' ),
		'not_found'                  => __( 'Not Found', 'dw_domain_types' ),
		'no_terms'                   => __( 'No Domain Types', 'dw_domain_types' ),
		'items_list'                 => __( 'Domain Types list', 'dw_domain_types' ),
		'items_list_navigation'      => __( 'Domain Types list navigation', 'dw_domain_types' ),
	);
	$rewrite = array(
		'slug'                       => 'domain_type',
		'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'              => false,
		'rewrite'                    => $rewrite,
	);
	register_taxonomy( 'domain_types', array( 'dw_domain_extensions' ), $args );

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

}