Or, embed this snippet using GenerateWP WordPress Plugin.

Download

Clone

Section Types

if ( ! function_exists( 'type_of_section' ) ) {

// Register Custom Taxonomy
function type_of_section() {

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

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

}