Or, embed this snippet using GenerateWP WordPress Plugin.

Download

Clone

ODD Blog

// Register Custom Post Type
function cpt_editionen() {

	$labels = array(
		'name'                  => _x( 'Editionen', 'Post Type General Name', 'text_domain' ),
		'singular_name'         => _x( 'Edition', 'Post Type Singular Name', 'text_domain' ),
		'menu_name'             => __( 'Editionen', 'text_domain' ),
		'name_admin_bar'        => __( 'Editionen', 'text_domain' ),
		'archives'              => __( 'Editionen Archive', 'text_domain' ),
		'attributes'            => __( 'Item Attributes', 'text_domain' ),
		'parent_item_colon'     => __( 'Parent Item:', 'text_domain' ),
		'all_items'             => __( 'Alle Editionen', 'text_domain' ),
		'add_new_item'          => __( 'Neue Edition hinzufügen', 'text_domain' ),
		'add_new'               => __( 'Erstellen', 'text_domain' ),
		'new_item'              => __( 'Neue Edition', 'text_domain' ),
		'edit_item'             => __( 'Edition ändern', 'text_domain' ),
		'update_item'           => __( 'Edition ändern', 'text_domain' ),
		'view_item'             => __( 'Edition ansehen', 'text_domain' ),
		'view_items'            => __( 'Editionen ansehen', 'text_domain' ),
		'search_items'          => __( 'Edition suchen', 'text_domain' ),
		'not_found'             => __( 'Keine Edition gefunden.', 'text_domain' ),
		'not_found_in_trash'    => __( 'Im Papierkorb nicht gefunden', 'text_domain' ),
		'featured_image'        => __( 'Blog Post Featured Image', 'text_domain' ),
		'set_featured_image'    => __( 'Set Blog Post Featured Image', 'text_domain' ),
		'remove_featured_image' => __( 'Remove Blog Post Featured Image', 'text_domain' ),
		'use_featured_image'    => __( 'Als Blog Post Featured Image benutzen', 'text_domain' ),
		'insert_into_item'      => __( 'In Edition einfügen', 'text_domain' ),
		'uploaded_to_this_item' => __( 'Zu dieser Edition hochgeladen', 'text_domain' ),
		'items_list'            => __( 'Editionen Liste', 'text_domain' ),
		'items_list_navigation' => __( 'Editionen Navigation', 'text_domain' ),
		'filter_items_list'     => __( 'Filter Editionen Liste', 'text_domain' ),
	);
	$rewrite = array(
		'slug'                  => 'edition',
		'with_front'            => true,
		'pages'                 => true,
		'feeds'                 => true,
	);
	$args = array(
		'label'                 => __( 'Edition', 'text_domain' ),
		'description'           => __( 'Editionen', 'text_domain' ),
		'labels'                => $labels,
		'supports'              => array( 'title', ),
		'taxonomies'            => array( 'ct_publisher', 'ct_artists' ),
		'hierarchical'          => false,
		'public'                => true,
		'show_ui'               => true,
		'show_in_menu'          => true,
		'menu_position'         => 5,
		'menu_icon'             => 'dashicons-images-alt',
		'show_in_admin_bar'     => true,
		'show_in_nav_menus'     => true,
		'can_export'            => true,
		'has_archive'           => 'editions',
		'exclude_from_search'   => false,
		'publicly_queryable'    => true,
		'rewrite'               => $rewrite,
		'capability_type'       => 'post',
		'show_in_rest'          => false,
	);
	register_post_type( 'cpt_editionen', $args );

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