Or, embed this snippet using GenerateWP WordPress Plugin.

Download

Clone

Publisher (tags)

// Register Custom Taxonomy
function publisher() {

	$labels = array(
		'name'                       => _x( 'Publishers', 'Taxonomy General Name', 'eggcup-library-catalogue' ),
		'singular_name'              => _x( 'Publisher', 'Taxonomy Singular Name', 'eggcup-library-catalogue' ),
		'menu_name'                  => __( 'Publisher', 'eggcup-library-catalogue' ),
		'all_items'                  => __( 'All Publishers', 'eggcup-library-catalogue' ),
		'parent_item'                => __( 'Parent Publisher', 'eggcup-library-catalogue' ),
		'parent_item_colon'          => __( 'Parent Publisher:', 'eggcup-library-catalogue' ),
		'new_item_name'              => __( 'New Publisher Name', 'eggcup-library-catalogue' ),
		'add_new_item'               => __( 'Add New Publisher', 'eggcup-library-catalogue' ),
		'edit_item'                  => __( 'Edit Publisher', 'eggcup-library-catalogue' ),
		'update_item'                => __( 'Update Publisher', 'eggcup-library-catalogue' ),
		'separate_items_with_commas' => __( 'Separate Publishers with commas', 'eggcup-library-catalogue' ),
		'search_items'               => __( 'Search Publishers', 'eggcup-library-catalogue' ),
		'add_or_remove_items'        => __( 'Add or remove Publishers', 'eggcup-library-catalogue' ),
		'choose_from_most_used'      => __( 'Choose from the most used Publishers', 'eggcup-library-catalogue' ),
		'not_found'                  => __( 'Not Found', 'eggcup-library-catalogue' ),
	);
	$rewrite = array(
		'slug'                       => 'publisher',
		'with_front'                 => true,
		'hierarchical'               => false,
	);
	$args = array(
		'labels'                     => $labels,
		'hierarchical'               => false,
		'public'                     => true,
		'show_ui'                    => true,
		'show_admin_column'          => true,
		'show_in_nav_menus'          => false,
		'show_tagcloud'              => false,
		'query_var'                  => 'publisher',
		'rewrite'                    => $rewrite,
	);
	register_taxonomy( 'publisher', array( 'publication' ), $args );

}

// Hook into the 'init' action
add_action( 'init', 'publisher', 0 );