Or, embed this snippet using GenerateWP WordPress Plugin.

Download

Clone

Untitled Snippet

// Register Custom Post Type
function wps_cpt_farben() {

	$labels = array(
		'name'                  => 'Farben',
		'singular_name'         => 'Farbe',
		'menu_name'             => 'Farben',
		'name_admin_bar'        => 'Farben',
		'archives'              => 'Farben',
		'attributes'            => 'Farben Attributes',
		'parent_item_colon'     => 'Übergeordnete Farbe',
		'all_items'             => 'Alle Farben',
		'add_new_item'          => 'Füge neuen FarbenGegegstand',
		'add_new'               => 'Neue Farbe hinzufügen',
		'new_item'              => 'Neuer FarbenGegenstand',
		'edit_item'             => 'Farbe bearbeiten',
		'update_item'           => 'Element aktualisieren',
		'view_item'             => 'Element anzeigen',
		'view_items'            => 'alles Farben anzeigen',
		'search_items'          => 'Suche in Farben',
		'not_found'             => 'Not found',
		'not_found_in_trash'    => 'Not found in Trash',
		'featured_image'        => 'Ausgewähltes Bild',
		'set_featured_image'    => 'Set featured image',
		'remove_featured_image' => 'Ausgewähltes Bild entfernen',
		'use_featured_image'    => 'Use as featured image',
		'insert_into_item'      => 'In Artikel einfügen',
		'uploaded_to_this_item' => 'Uploaded to this item',
		'items_list'            => 'Artikelliste',
		'items_list_navigation' => 'Artikel-Navigation',
		'filter_items_list'     => 'Elementliste filtern',
	);
	$args = array(
		'label'                 => 'Farbe',
		'description'           => 'Beschreibung Farben',
		'labels'                => $labels,
		'supports'              => array( 'title', 'editor', 'thumbnail', 'custom-fields', 'page-attributes', 'post-formats' ),
		'hierarchical'          => true,
		'public'                => true,
		'show_ui'               => true,
		'show_in_menu'          => true,
		'menu_position'         => 20,
		'menu_icon'             => 'dashicons-media-archive',
		'show_in_admin_bar'     => true,
		'show_in_nav_menus'     => true,
		'can_export'            => true,
		'has_archive'           => true,
		'exclude_from_search'   => false,
		'publicly_queryable'    => true,
		'capability_type'       => 'page',
	);
	register_post_type( 'farben', $args );

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