Or, embed this snippet using GenerateWP WordPress Plugin.

Download

Clone

tax-subjects

// Register Custom Taxonomy
function tax_subjects() {

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

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