Or, embed this snippet using GenerateWP WordPress Plugin.

Download

Clone

cycle

// Register Custom Taxonomy
function custom_taxonomy() {

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

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