Or, embed this snippet using GenerateWP WordPress Plugin.

Download

Clone

ded_fotoalbum

Fotoalbum für MV Seewinkel

if ( ! function_exists('fotoalbum_post_type') ) {

// Register Custom Post Type
function fotoalbum_post_type() {

	$labels = array(
		'name'                  => _x( 'fotoalbums', 'Post Type General Name', 'ded_fotoalbum' ),
		'singular_name'         => _x( 'fotoalbum', 'Post Type Singular Name', 'ded_fotoalbum' ),
		'menu_name'             => __( 'Fotoalbum', 'ded_fotoalbum' ),
		'name_admin_bar'        => __( 'Fotoalbum', 'ded_fotoalbum' ),
		'archives'              => __( 'Fotoalbums', 'ded_fotoalbum' ),
		'attributes'            => __( 'Fotoalbums', 'ded_fotoalbum' ),
		'parent_item_colon'     => __( 'Parent Album:', 'ded_fotoalbum' ),
		'all_items'             => __( 'Alle Albums', 'ded_fotoalbum' ),
		'add_new_item'          => __( 'Neues Album', 'ded_fotoalbum' ),
		'add_new'               => __( 'Neues Album', 'ded_fotoalbum' ),
		'new_item'              => __( 'Neues Album', 'ded_fotoalbum' ),
		'edit_item'             => __( 'Album bearbeiten', 'ded_fotoalbum' ),
		'update_item'           => __( 'Album speichern', 'ded_fotoalbum' ),
		'view_item'             => __( 'Zeige Album', 'ded_fotoalbum' ),
		'view_items'            => __( 'Zeige Albums', 'ded_fotoalbum' ),
		'search_items'          => __( 'Suche Album', 'ded_fotoalbum' ),
		'not_found'             => __( 'Nicht gefunden', 'ded_fotoalbum' ),
		'not_found_in_trash'    => __( 'Nicht im Papierkorb', 'ded_fotoalbum' ),
		'featured_image'        => __( 'Anzeigebild Album', 'ded_fotoalbum' ),
		'set_featured_image'    => __( 'Setze Anzeigebild', 'ded_fotoalbum' ),
		'remove_featured_image' => __( 'Wechsle Anzeigebild', 'ded_fotoalbum' ),
		'use_featured_image'    => __( 'Benutze Anzeigebild', 'ded_fotoalbum' ),
		'insert_into_item'      => __( 'Füge in Album ein', 'ded_fotoalbum' ),
		'uploaded_to_this_item' => __( 'Lade in das Album', 'ded_fotoalbum' ),
		'items_list'            => __( 'Album Liste', 'ded_fotoalbum' ),
		'items_list_navigation' => __( 'Albums Navigation', 'ded_fotoalbum' ),
		'filter_items_list'     => __( 'Filter Albums', 'ded_fotoalbum' ),
	);
	$args = array(
		'label'                 => __( 'fotoalbum', 'ded_fotoalbum' ),
		'description'           => __( 'Fotoalbum für MV Seewinkel', 'ded_fotoalbum' ),
		'labels'                => $labels,
		'supports'              => array( 'title', 'editor', 'thumbnail', 'custom-fields' ),
		'taxonomies'            => array( 'category', 'post_tag' ),
		'hierarchical'          => false,
		'public'                => true,
		'show_ui'               => true,
		'show_in_menu'          => true,
		'menu_position'         => 5,
		'menu_icon'             => 'dashicons-book-alt',
		'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',
		'show_in_rest'          => true,
		'rest_controller_class' => 'WP_REST_Fotoalbum_Contoller',
	);
	register_post_type( 'ded_fotoalbum', $args );

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

}