Or, embed this snippet using GenerateWP WordPress Plugin.

Download

Clone

Downloads CPT

// Register Custom Post Type
function tq_downloads_cpt() {

	$labels = array(
		'name'                  => _x( 'Downloads', 'Post Type General Name', 'taquiri' ),
		'singular_name'         => _x( 'Download', 'Post Type Singular Name', 'taquiri' ),
		'menu_name'             => __( 'Downloads', 'taquiri' ),
		'name_admin_bar'        => __( 'Downloads', 'taquiri' ),
		'archives'              => __( 'Download Archiv', 'taquiri' ),
		'parent_item_colon'     => __( 'Übergeordneter Download', 'taquiri' ),
		'all_items'             => __( 'Alle Downloads', 'taquiri' ),
		'add_new_item'          => __( 'Neuen Download hinzufügen', 'taquiri' ),
		'add_new'               => __( 'Neuen hinzufügen', 'taquiri' ),
		'new_item'              => __( 'Neuer Download', 'taquiri' ),
		'edit_item'             => __( 'Download bearbeiten', 'taquiri' ),
		'update_item'           => __( 'Download updaten', 'taquiri' ),
		'view_item'             => __( 'Download ansehen', 'taquiri' ),
		'search_items'          => __( 'Download suchen', 'taquiri' ),
		'not_found'             => __( 'Nicht gefunden', 'taquiri' ),
		'not_found_in_trash'    => __( 'Nicht im Papierkorb gefunden', 'taquiri' ),
		'featured_image'        => __( 'Beitragsbild', 'taquiri' ),
		'set_featured_image'    => __( 'Beitragsbild festlegen', 'taquiri' ),
		'remove_featured_image' => __( 'Beitragsbild entfernen', 'taquiri' ),
		'use_featured_image'    => __( 'Als Beitragsbild verwenden', 'taquiri' ),
		'insert_into_item'      => __( 'Zu dem Download hinzufügen', 'taquiri' ),
		'uploaded_to_this_item' => __( 'Zu diesem Download hochgeladen', 'taquiri' ),
		'items_list'            => __( 'Download Liste', 'taquiri' ),
		'items_list_navigation' => __( 'Download Listen-Navigation', 'taquiri' ),
		'filter_items_list'     => __( 'Download Liste filtern', 'taquiri' ),
	);
	$args = array(
		'label'                 => __( 'Download', 'taquiri' ),
		'description'           => __( 'Verwaltung von Downloads', 'taquiri' ),
		'labels'                => $labels,
		'supports'              => array( 'title', 'thumbnail', 'revisions', ),
		'hierarchical'          => false,
		'public'                => true,
		'show_ui'               => true,
		'show_in_menu'          => true,
		'menu_position'         => 5,
		'menu_icon'             => 'dashicons-download',
		'show_in_admin_bar'     => true,
		'show_in_nav_menus'     => false,
		'can_export'            => true,
		'has_archive'           => true,		
		'exclude_from_search'   => false,
		'publicly_queryable'    => true,
		'capability_type'       => 'page',
	);
	register_post_type( 'tq_doenloads', $args );

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