Or, embed this snippet using GenerateWP WordPress Plugin.

Download

Clone

Thema Taxonomy

to use with Book Themas – https://ns.editeur.org/thema/sv

// Register Custom Taxonomy
function thema_taxonomy() {

	$labels = array(
		'name'                       => _x( 'Themas', 'Taxonomy General Name', 'thema' ),
		'singular_name'              => _x( 'Thema', 'Taxonomy Singular Name', 'thema' ),
		'menu_name'                  => __( 'Thema', 'thema' ),
		'all_items'                  => __( 'All Themas', 'thema' ),
		'parent_item'                => __( 'Parent Thema', 'thema' ),
		'parent_item_colon'          => __( 'Parent Thema:', 'thema' ),
		'new_item_name'              => __( 'New Thema Name', 'thema' ),
		'add_new_item'               => __( 'Add New Thema', 'thema' ),
		'edit_item'                  => __( 'Edit Thema', 'thema' ),
		'update_item'                => __( 'Update Thema', 'thema' ),
		'view_item'                  => __( 'View Item', 'thema' ),
		'separate_items_with_commas' => __( 'Separate thema with commas', 'thema' ),
		'add_or_remove_items'        => __( 'Add or remove themas', 'thema' ),
		'choose_from_most_used'      => __( 'Choose from the most used themas', 'thema' ),
		'popular_items'              => __( 'Popular Items', 'thema' ),
		'search_items'               => __( 'Search Themas', 'thema' ),
		'not_found'                  => __( 'Not Found', 'thema' ),
		'no_terms'                   => __( 'No items', 'thema' ),
		'items_list'                 => __( 'Items list', 'thema' ),
		'items_list_navigation'      => __( 'Items list navigation', 'thema' ),
	);
	$args = array(
		'labels'                     => $labels,
		'hierarchical'               => true,
		'public'                     => true,
		'show_ui'                    => true,
		'show_admin_column'          => true,
		'show_in_nav_menus'          => true,
		'show_tagcloud'              => true,
	);
	register_taxonomy( 'thema', array( 'post' ), $args );

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