Or, embed this snippet using GenerateWP WordPress Plugin.

Download

Clone

CPT pobocky taxonomy

// Register Custom Taxonomy
function custom_pobocky_taxonomy() {

	$labels = array(
		'name'                       => _x( 'Regiony', 'Taxonomy General Name', 'tomaspribil' ),
		'singular_name'              => _x( 'Region', 'Taxonomy Singular Name', 'tomaspribil' ),
		'menu_name'                  => __( '(f) REGIONY', 'tomaspribil' ),
		'all_items'                  => __( 'Všechny regiony', 'tomaspribil' ),
		'parent_item'                => __( 'Nadřazený region', 'tomaspribil' ),
		'parent_item_colon'          => __( 'Nadřazený region', 'tomaspribil' ),
		'new_item_name'              => __( 'Nový region', 'tomaspribil' ),
		'add_new_item'               => __( 'Přidat nový region', 'tomaspribil' ),
		'edit_item'                  => __( 'Upravit region', 'tomaspribil' ),
		'update_item'                => __( 'Aktualizovat region', 'tomaspribil' ),
		'view_item'                  => __( 'Zobrazit region', 'tomaspribil' ),
		'separate_items_with_commas' => __( 'Separate items with commas', 'tomaspribil' ),
		'add_or_remove_items'        => __( 'Přidat nebo odebrat regiony', 'tomaspribil' ),
		'choose_from_most_used'      => __( 'Nejčastěji používáné', 'tomaspribil' ),
		'popular_items'              => __( 'Oblíbené regiony', 'tomaspribil' ),
		'search_items'               => __( 'Hledat regiony', 'tomaspribil' ),
		'not_found'                  => __( 'Nenalezen', 'tomaspribil' ),
		'no_terms'                   => __( 'Žádné regiony', 'tomaspribil' ),
		'items_list'                 => __( 'Seznam regionů', 'tomaspribil' ),
		'items_list_navigation'      => __( 'Navigace v seznamu regionů', 'tomaspribil' ),
	);
	$rewrite = array(
		'slug'                       => 'regiony-pobocek',
		'with_front'                 => true,
		'hierarchical'               => false,
	);
	$args = array(
		'labels'                     => $labels,
		'hierarchical'               => true,
		'public'                     => false,
		'show_ui'                    => true,
		'show_admin_column'          => true,
		'show_in_nav_menus'          => false,
		'show_tagcloud'              => false,
		'rewrite'                    => $rewrite,
	);
	register_taxonomy( 'pobocky_regiony', array( 'pobocky', 'lide', 'socialni-sluzby' ), $args );

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