Or, embed this snippet using GenerateWP WordPress Plugin.

Download

Clone

Tecatà Spot

// Register Custom Post Type
function spot_post_type() {

	$labels = array(
		'name'                  => _x( 'Spot', 'Post Type General Name', 'text_domain' ),
		'singular_name'         => _x( 'Spot', 'Post Type Singular Name', 'text_domain' ),
		'menu_name'             => __( 'Spot', 'text_domain' ),
		'name_admin_bar'        => __( 'Spot', 'text_domain' ),
		'archives'              => __( 'Archivi spot', 'text_domain' ),
		'attributes'            => __( 'Attributi spot', 'text_domain' ),
		'parent_item_colon'     => __( 'Spot genitore:', 'text_domain' ),
		'all_items'             => __( 'Tutti gli spot', 'text_domain' ),
		'add_new_item'          => __( 'Aggiungi nuovo spot', 'text_domain' ),
		'add_new'               => __( 'Nuovo spot', 'text_domain' ),
		'new_item'              => __( 'Nuovo spot', 'text_domain' ),
		'edit_item'             => __( 'Modifica spot', 'text_domain' ),
		'update_item'           => __( 'Aggiorna spot', 'text_domain' ),
		'view_item'             => __( 'Visualizza spot', 'text_domain' ),
		'view_items'            => __( 'Visualizza elementi', 'text_domain' ),
		'search_items'          => __( 'Cerca spot', 'text_domain' ),
		'not_found'             => __( 'Nessuno spot trovato', 'text_domain' ),
		'not_found_in_trash'    => __( 'Nessuno spot trovato nel Cestino', 'text_domain' ),
		'featured_image'        => __( 'Immagine in evidenza', 'text_domain' ),
		'set_featured_image'    => __( 'Imposta immagine in evidenza', 'text_domain' ),
		'remove_featured_image' => __( 'Rimuovi immagine in evidenza', 'text_domain' ),
		'use_featured_image'    => __( 'Utilizza immagine in evidenza', 'text_domain' ),
		'insert_into_item'      => __( 'Inserisci in elemento', 'text_domain' ),
		'uploaded_to_this_item' => __( 'Caricato in questo elemento', 'text_domain' ),
		'items_list'            => __( 'Lista elementi', 'text_domain' ),
		'items_list_navigation' => __( 'Navigazione lista elementi', 'text_domain' ),
		'filter_items_list'     => __( 'Filtra lista elementi', 'text_domain' ),
	);
	$args = array(
		'label'                 => __( 'Spot', 'text_domain' ),
		'description'           => __( 'Spot pubblicitario', 'text_domain' ),
		'labels'                => $labels,
		'supports'              => array( 'title', 'editor', 'thumbnail', 'comments', 'revisions', 'custom-fields' ),
		'taxonomies'            => array( 'azienda', ' prodotto', ' anno', ' category', ' post_tag', ' campagna' ),
		'hierarchical'          => false,
		'public'                => true,
		'show_ui'               => true,
		'show_in_menu'          => true,
		'menu_position'         => 5,
		'menu_icon'             => 'dashicons-media-video',
		'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,
	);
	register_post_type( 'spot', $args );

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