Or, embed this snippet using GenerateWP WordPress Plugin.

Download

Clone

Nieuws categoriën

// Register Custom Taxonomy
function nieuws_taxonomy() {

	$labels = array(
		'name'                       => _x( 'Categoriën nieuws', 'Taxonomy General Name', 'text_domain' ),
		'singular_name'              => _x( 'Categorie nieuws', 'Taxonomy Singular Name', 'text_domain' ),
		'menu_name'                  => __( 'Categoriën nieuws', 'text_domain' ),
		'all_items'                  => __( 'Alle categoriën', 'text_domain' ),
		'parent_item'                => __( 'Hoofd categorie', 'text_domain' ),
		'parent_item_colon'          => __( 'Hoofd categorie', 'text_domain' ),
		'new_item_name'              => __( 'Voeg categorie toe', 'text_domain' ),
		'add_new_item'               => __( 'Voeg categorie toe', 'text_domain' ),
		'edit_item'                  => __( 'Wijzig categorie', 'text_domain' ),
		'update_item'                => __( 'Bewaar categorie', 'text_domain' ),
		'separate_items_with_commas' => __( 'Comma gescheiden waardes', 'text_domain' ),
		'search_items'               => __( 'Doorzoek categoriën', 'text_domain' ),
		'add_or_remove_items'        => __( 'Verwijder of voeg categorie toe', 'text_domain' ),
		'choose_from_most_used'      => __( 'Kies meest gebruikte categoriën', 'text_domain' ),
		'not_found'                  => __( 'Niet gevonden', 'text_domain' ),
	);
	$rewrite = array(
		'slug'                       => 'nieuws',
		'with_front'                 => true,
		'hierarchical'               => false,
	);
	$args = array(
		'labels'                     => $labels,
		'hierarchical'               => false,
		'public'                     => true,
		'show_ui'                    => true,
		'show_admin_column'          => true,
		'show_in_nav_menus'          => true,
		'show_tagcloud'              => true,
		'rewrite'                    => $rewrite,
	);
	register_taxonomy( 'nieuws_categorie', array( 'nieuws' ), $args );

}

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