Or, embed this snippet using GenerateWP WordPress Plugin.

Download

Clone

Kaleb Regionen

// Register Custom Taxonomy
function kaleb_tax_regionen() {

	$labels = array(
		'name'                       => _x( 'Regionen', 'Taxonomy General Name', 'kaleb-locations' ),
		'singular_name'              => _x( 'Region', 'Taxonomy Singular Name', 'kaleb-locations' ),
		'menu_name'                  => __( 'Regionen', 'kaleb-locations' ),
		'all_items'                  => __( 'Alle Regionen', 'kaleb-locations' ),
		'parent_item'                => __( 'Übergeordnete Region', 'kaleb-locations' ),
		'parent_item_colon'          => __( 'Übergeordnete Region:', 'kaleb-locations' ),
		'new_item_name'              => __( 'Neue Region', 'kaleb-locations' ),
		'add_new_item'               => __( 'Hinzufügen', 'kaleb-locations' ),
		'edit_item'                  => __( 'Region bearbeiten', 'kaleb-locations' ),
		'update_item'                => __( 'Region aktualisieren', 'kaleb-locations' ),
		'view_item'                  => __( 'Region ansehen', 'kaleb-locations' ),
		'separate_items_with_commas' => __( 'Regionen mit Komma trennen', 'kaleb-locations' ),
		'add_or_remove_items'        => __( 'Regionen hinzufügen oder entfernen', 'kaleb-locations' ),
		'choose_from_most_used'      => __( 'Von den meistverwendeten Regionen wählen', 'kaleb-locations' ),
		'popular_items'              => __( 'Beliebte Regionen', 'kaleb-locations' ),
		'search_items'               => __( 'Regionen suchen', 'kaleb-locations' ),
		'not_found'                  => __( 'Es wurden keine Regionen gefunden', 'kaleb-locations' ),
		'no_terms'                   => __( 'Es wurden noch keine Regionen angelegt.', 'kaleb-locations' ),
		'items_list'                 => __( 'Regionenliste', 'kaleb-locations' ),
		'items_list_navigation'      => __( 'Regionenliste-Navigation', 'kaleb-locations' ),
	);
	$rewrite = array(
		'slug'                       => 'regionen',
		'with_front'                 => true,
		'hierarchical'               => false,
	);
	$args = array(
		'labels'                     => $labels,
		'hierarchical'               => true,
		'public'                     => true,
		'show_ui'                    => true,
		'show_admin_column'          => true,
		'show_in_nav_menus'          => true,
		'show_tagcloud'              => true,
		'rewrite'                    => $rewrite,
		'show_in_rest'               => true,
	);
	register_taxonomy( 'kaleb-region', array( 'kaleb-location' ), $args );

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