Or, embed this snippet using GenerateWP WordPress Plugin.

Download

Clone

Section Taxonomy

if ( ! function_exists( 'knowledge_section' ) ) {

// Register Custom Taxonomy
function knowledge_section() {

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

}

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

}