Or, embed this snippet using GenerateWP WordPress Plugin.

Download

Clone

Autoluce Attrezzatura

if ( ! function_exists('attrezzatura_post_type') ) {

// Register Custom Post Type
function attrezzatura_post_type() {

	$labels = array(
		'name'                  => _x( 'attrezzature', 'Post Type General Name', 'autoluce_post_type' ),
		'singular_name'         => _x( 'attrezzatura', 'Post Type Singular Name', 'autoluce_post_type' ),
		'menu_name'             => __( 'Attrezzatura', 'autoluce_post_type' ),
		'name_admin_bar'        => __( 'Attrezzatura', 'autoluce_post_type' ),
		'archives'              => __( 'Archivio Attrezzatura', 'autoluce_post_type' ),
		'attributes'            => __( 'Attributi Attrezzatura', 'autoluce_post_type' ),
		'parent_item_colon'     => __( 'Parent Item:', 'autoluce_post_type' ),
		'all_items'             => __( 'Tutte le Attrezzature', 'autoluce_post_type' ),
		'add_new_item'          => __( 'Aggiungi nuova Attrezzatura', 'autoluce_post_type' ),
		'add_new'               => __( 'Aggiungi Nuova', 'autoluce_post_type' ),
		'new_item'              => __( 'Nuova Attrezzatura', 'autoluce_post_type' ),
		'edit_item'             => __( 'Modifica Attrezzatura', 'autoluce_post_type' ),
		'update_item'           => __( 'Aggiorna Attrezzatura', 'autoluce_post_type' ),
		'view_item'             => __( 'Vedi Attrezzatura', 'autoluce_post_type' ),
		'view_items'            => __( 'Vedi Attrezzature', 'autoluce_post_type' ),
		'search_items'          => __( 'Cerca Attrezzatura', 'autoluce_post_type' ),
		'not_found'             => __( 'Nessun Risultato', 'autoluce_post_type' ),
		'not_found_in_trash'    => __( 'Nessun risultato nel Cestino', 'autoluce_post_type' ),
		'featured_image'        => __( 'Immagine in Evidenza', 'autoluce_post_type' ),
		'set_featured_image'    => __( 'Imposta Immagine in Evidenza', 'autoluce_post_type' ),
		'remove_featured_image' => __( 'Rimuovi Immagine in evidenza', 'autoluce_post_type' ),
		'use_featured_image'    => __( 'Usa come Immagine in Evidrenza', 'autoluce_post_type' ),
		'insert_into_item'      => __( 'Usa nell'Attrezzatura', 'autoluce_post_type' ),
		'uploaded_to_this_item' => __( 'Caricati in questa Attrezzatura', 'autoluce_post_type' ),
		'items_list'            => __( 'Lista Attrezzature', 'autoluce_post_type' ),
		'items_list_navigation' => __( 'Navigazione lista Attrezzatura', 'autoluce_post_type' ),
		'filter_items_list'     => __( 'Filtra lista Attrezzatura', 'autoluce_post_type' ),
	);
	$args = array(
		'label'                 => __( 'attrezzatura', 'autoluce_post_type' ),
		'description'           => __( 'Post Type Description', 'autoluce_post_type' ),
		'labels'                => $labels,
		'supports'              => array( 'title', 'editor', 'thumbnail', 'revisions', 'custom-fields', 'page-attributes' ),
		'taxonomies'            => array( 'attrezzatura_cat' ),
		'hierarchical'          => false,
		'public'                => true,
		'show_ui'               => true,
		'show_in_menu'          => true,
		'menu_position'         => 5,
		'menu_icon'             => 'dashicons-admin-tools',
		'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( 'attrezzatura', $args );

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

}