Or, embed this snippet using GenerateWP WordPress Plugin.

Download

Clone

protocol

// Register Custom Post Type
function protocol_post_type() {

	$labels = array(
		'name'                => _x( 'Protokolle', 'Post Type General Name', 'text_domain' ),
		'singular_name'       => _x( 'Protokoll', 'Post Type Singular Name', 'text_domain' ),
		'menu_name'           => __( 'Protokoll', 'text_domain' ),
		'parent_item_colon'   => __( 'Parent Protokoll:', 'text_domain' ),
		'all_items'           => __( 'Alle Protokolle', 'text_domain' ),
		'view_item'           => __( 'Protokoll ansehen', 'text_domain' ),
		'add_new_item'        => __( 'Neues Protokoll hinzufügen', 'text_domain' ),
		'add_new'             => __( 'Neues Protokoll', 'text_domain' ),
		'edit_item'           => __( 'Protokoll editieren', 'text_domain' ),
		'update_item'         => __( 'Protokoll aktualisieren', 'text_domain' ),
		'search_items'        => __( 'Protokolle suchen', 'text_domain' ),
		'not_found'           => __( 'Kein Protokoll gefunden', 'text_domain' ),
		'not_found_in_trash'  => __( 'Kein Protokoll im Papierkorb', 'text_domain' ),
	);
	$capabilities = array(
		'edit_post'           => 'edit_post',
		'read_post'           => 'read_post',
		'delete_post'         => 'delete_post',
		'edit_posts'          => 'edit_posts',
		'edit_others_posts'   => 'edit_others_posts',
		'publish_posts'       => 'publish_posts',
		'read_private_posts'  => 'read_private_posts',
	);
	$args = array(
		'label'               => __( 'protocol', 'text_domain' ),
		'description'         => __( 'BME Protokolle', 'text_domain' ),
		'labels'              => $labels,
		'supports'            => array( 'title', 'editor', 'excerpt', 'author', 'thumbnail', 'comments', 'custom-fields', 'page-attributes', 'post-formats', ),
		'taxonomies'          => array( 'category', 'post_tag' ),
		'hierarchical'        => false,
		'public'              => true,
		'show_ui'             => true,
		'show_in_menu'        => true,
		'show_in_nav_menus'   => true,
		'show_in_admin_bar'   => true,
		'menu_position'       => 5,
		'can_export'          => true,
		'has_archive'         => true,
		'exclude_from_search' => false,
		'publicly_queryable'  => true,
		'capabilities'        => $capabilities,
	);
	register_post_type( 'protocol', $args );

}

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