Or, embed this snippet using GenerateWP WordPress Plugin.

Download

Clone

B3W Gallery Album

// Register Custom Post Type
function bd_gallery() {

	$labels = array(
		'name'                  => _x( 'Alben', 'Post Type General Name', 'bd_gallery' ),
		'singular_name'         => _x( 'Album', 'Post Type Singular Name', 'bd_gallery' ),
		'menu_name'             => __( 'B3W Galerie', 'bd_gallery' ),
		'name_admin_bar'        => __( 'B3W Galerie', 'bd_gallery' ),
		'archives'              => __( 'Archive', 'bd_gallery' ),
		'parent_item_colon'     => __( 'Übergeordnetes Album', 'bd_gallery' ),
		'all_items'             => __( 'Alle Alben', 'bd_gallery' ),
		'add_new_item'          => __( 'Neus Album', 'bd_gallery' ),
		'add_new'               => __( 'Hinzufügen', 'bd_gallery' ),
		'new_item'              => __( 'Neu', 'bd_gallery' ),
		'edit_item'             => __( 'Bearbeiten', 'bd_gallery' ),
		'update_item'           => __( 'Ändern', 'bd_gallery' ),
		'view_item'             => __( 'Anzeigen', 'bd_gallery' ),
		'search_items'          => __( 'Suchen', 'bd_gallery' ),
		'not_found'             => __( 'Nicht gefunden', 'bd_gallery' ),
		'not_found_in_trash'    => __( 'Nicht im Papierkorb gefunden', 'bd_gallery' ),
		'featured_image'        => __( 'Albumbild', 'bd_gallery' ),
		'set_featured_image'    => __( 'Albumbild festlefen', 'bd_gallery' ),
		'remove_featured_image' => __( 'Albumbild entfernen', 'bd_gallery' ),
		'use_featured_image'    => __( 'Als Albumbild verwenden', 'bd_gallery' ),
		'insert_into_item'      => __( 'In Album einfügen', 'bd_gallery' ),
		'uploaded_to_this_item' => __( 'Zu Album hinzugefügt', 'bd_gallery' ),
		'items_list'            => __( 'Liste', 'bd_gallery' ),
		'items_list_navigation' => __( 'Navigation', 'bd_gallery' ),
		'filter_items_list'     => __( 'Filtern', 'bd_gallery' ),
	);
	$args = array(
		'label'                 => __( 'Album', 'bd_gallery' ),
		'description'           => __( 'Galerie Album', 'bd_gallery' ),
		'labels'                => $labels,
		'supports'              => array( 'title', ),
		'taxonomies'            => array( 'category', 'post_tag' ),
		'hierarchical'          => false,
		'public'                => true,
		'show_ui'               => true,
		'show_in_menu'          => true,
		'menu_position'         => 5,
		'show_in_admin_bar'     => true,
		'show_in_nav_menus'     => true,
		'can_export'            => true,
		'has_archive'           => true,		
		'exclude_from_search'   => true,
		'publicly_queryable'    => true,
		'capability_type'       => 'page',
	);
	register_post_type( 'bd_gallery_album', $args );

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