Or, embed this snippet using GenerateWP WordPress Plugin.

Download

Clone

Tema tax – PAS

// Register Custom Taxonomy
function custom_taxonomytema_taxonomy() {

	$labels = array(
		'name'                       => 'Tema',
		'singular_name'              => 'Tema',
		'menu_name'                  => 'Tema',
		'all_items'                  => 'Alle tema',
		'parent_item'                => 'Foreldertema',
		'parent_item_colon'          => 'Foreldertema:',
		'new_item_name'              => 'Nytt tema',
		'add_new_item'               => 'Legg til tema',
		'edit_item'                  => 'Rediger tema',
		'update_item'                => 'Oppdater tema',
		'view_item'                  => 'Se tema',
		'separate_items_with_commas' => 'Skill tema med komma',
		'add_or_remove_items'        => 'Legg til eller fjern tema',
		'choose_from_most_used'      => 'Velg tema fra mest brukt',
		'popular_items'              => 'Populære tema',
		'search_items'               => 'Søk i tema',
		'not_found'                  => 'Ikke funnet',
		'no_terms'                   => 'Ingen tema',
		'items_list'                 => 'Temaliste',
		'items_list_navigation'      => 'Temaliste navigering',
	);
	$rewrite = array(
		'slug'                       => 'tema',
		'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,
		'rest_base'                  => 'tema',
	);
	register_taxonomy( 'tema', array( 'post_modul' ), $args );

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