Or, embed this snippet using GenerateWP WordPress Plugin.

Download

Clone

Sections

// Register Custom Taxonomy
function funews_section_custom_taxonomy() {

	$labels = array(
		'name'                       => _x( 'Sections', 'Taxonomy General Name', 'funews' ),
		'singular_name'              => _x( 'Section', 'Taxonomy Singular Name', 'funews' ),
		'menu_name'                  => __( 'Section', 'funews' ),
		'all_items'                  => __( 'All Sections', 'funews' ),
		'parent_item'                => __( 'Parent Section', 'funews' ),
		'parent_item_colon'          => __( 'Parent Section:', 'funews' ),
		'new_item_name'              => __( 'New Section', 'funews' ),
		'add_new_item'               => __( 'Add Section', 'funews' ),
		'edit_item'                  => __( 'Edit Section', 'funews' ),
		'update_item'                => __( 'Update Section', 'funews' ),
		'view_item'                  => __( 'View Section', 'funews' ),
		'separate_items_with_commas' => __( 'Separate sections with commas', 'funews' ),
		'add_or_remove_items'        => __( 'Add or remove sections', 'funews' ),
		'choose_from_most_used'      => __( 'Choose from the most used sections', 'funews' ),
		'popular_items'              => __( 'Popular sections', 'funews' ),
		'search_items'               => __( 'Search sections', 'funews' ),
		'not_found'                  => __( 'Not Found', 'funews' ),
		'no_terms'                   => __( 'No sections', 'funews' ),
		'items_list'                 => __( 'Sections list', 'funews' ),
		'items_list_navigation'      => __( 'Sections list navigation', 'funews' ),
	);
	$args = array(
		'labels'                     => $labels,
		'hierarchical'               => true,
		'public'                     => true,
		'show_ui'                    => true,
		'show_admin_column'          => true,
		'show_in_nav_menus'          => true,
		'show_tagcloud'              => false,
	);
	register_taxonomy( 'section', array( 'post' ), $args );

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