Or, embed this snippet using GenerateWP WordPress Plugin.

Download

Clone

haverit_kotimaa

Haverit kotimaa maakoodikategoriat

if ( ! function_exists( 'haverit_maa_taxonomy' ) ) {

// Register Custom Taxonomy
function haverit_maa_taxonomy() {

	$labels = array(
		'name'                       => _x( 'Maat', 'Taxonomy General Name', 'haverit_domain' ),
		'singular_name'              => _x( 'Maa', 'Taxonomy Singular Name', 'haverit_domain' ),
		'menu_name'                  => __( 'Maat', 'haverit_domain' ),
		'all_items'                  => __( 'Kaikki maat', 'haverit_domain' ),
		'parent_item'                => __( 'Parent maa', 'haverit_domain' ),
		'parent_item_colon'          => __( 'Parent maa:', 'haverit_domain' ),
		'new_item_name'              => __( 'New Maa', 'haverit_domain' ),
		'add_new_item'               => __( 'Add New Maa', 'haverit_domain' ),
		'edit_item'                  => __( 'Edit Maa', 'haverit_domain' ),
		'update_item'                => __( 'Update Maa', 'haverit_domain' ),
		'view_item'                  => __( 'View Maa', 'haverit_domain' ),
		'separate_items_with_commas' => __( 'SeparateMaat with commas', 'haverit_domain' ),
		'add_or_remove_items'        => __( 'Add or remove Maa', 'haverit_domain' ),
		'choose_from_most_used'      => __( 'Valitse yleisimmin käytetyistä', 'haverit_domain' ),
		'popular_items'              => __( 'Suositut Maat', 'haverit_domain' ),
		'search_items'               => __( 'Search Maa', 'haverit_domain' ),
		'not_found'                  => __( 'Not Found', 'haverit_domain' ),
		'no_terms'                   => __( 'Ei yhtään maakoodia', 'haverit_domain' ),
		'items_list'                 => __( 'Maakoodi list', 'haverit_domain' ),
		'items_list_navigation'      => __( 'maakoodi list navigation', 'haverit_domain' ),
	);
	$args = array(
		'labels'                     => $labels,
		'hierarchical'               => true,
		'public'                     => true,
		'show_ui'                    => true,
		'show_admin_column'          => true,
		'show_in_nav_menus'          => true,
		'show_tagcloud'              => true,
		'show_in_rest'               => true,
	);
	register_taxonomy( 'haverit_maa', array( 'post' ), $args );

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

}