Or, embed this snippet using GenerateWP WordPress Plugin.

Download

Clone

Big Event Categories

// Register Custom Taxonomy
function big_events_category_taxonomy() {

	$labels = array(
		'name'                       => _x( 'Big Events Categories', 'Taxonomy General Name', 'swing_fever_plugin' ),
		'singular_name'              => _x( 'Big Events Category', 'Taxonomy Singular Name', 'swing_fever_plugin' ),
		'menu_name'                  => __( 'Big Event Category', 'swing_fever_plugin' ),
		'all_items'                  => __( 'All Big Event Categories', 'swing_fever_plugin' ),
		'parent_item'                => __( 'Parent Category', 'swing_fever_plugin' ),
		'parent_item_colon'          => __( 'Parent Category:', 'swing_fever_plugin' ),
		'new_item_name'              => __( 'New Category Name', 'swing_fever_plugin' ),
		'add_new_item'               => __( 'Add New Big Event Category', 'swing_fever_plugin' ),
		'edit_item'                  => __( 'Edit Big Event Category', 'swing_fever_plugin' ),
		'update_item'                => __( 'Update Big Event Category', 'swing_fever_plugin' ),
		'view_item'                  => __( 'View Big Event Category', 'swing_fever_plugin' ),
		'separate_items_with_commas' => __( 'Separate Categories with commas', 'swing_fever_plugin' ),
		'add_or_remove_items'        => __( 'Add or remove Big Event Categories', 'swing_fever_plugin' ),
		'choose_from_most_used'      => __( 'Choose from the most used', 'swing_fever_plugin' ),
		'popular_items'              => __( 'Popular Big Event Categories', 'swing_fever_plugin' ),
		'search_items'               => __( 'Search Big Event Categories', 'swing_fever_plugin' ),
		'not_found'                  => __( 'Not Found', 'swing_fever_plugin' ),
	);
	$rewrite = array(
		'slug'                       => '',
		'with_front'                 => false,
		'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( 'big_events_category', array( 'big_events' ), $args );

}

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