Or, embed this snippet using GenerateWP WordPress Plugin.

Download

Clone

Motos Novas

// Register Custom Post Type
function novas() {

	$labels = array(
		'name'                  => 'Motos Novas',
		'singular_name'         => 'Moto Nova',
		'menu_name'             => 'Motos Novas',
		'name_admin_bar'        => 'Motos Novas',
		'archives'              => 'Arquivos',
		'attributes'            => 'Atributos',
		'parent_item_colon'     => 'Pai:',
		'all_items'             => 'Todos',
		'add_new_item'          => 'Adicionar',
		'add_new'               => 'Adicionar',
		'new_item'              => 'Nova',
		'edit_item'             => 'Editar',
		'update_item'           => 'Atualizar',
		'view_item'             => 'Visualizar',
		'view_items'            => 'Visualizar',
		'search_items'          => 'Pesquisar',
		'not_found'             => 'Não encontrada',
		'not_found_in_trash'    => 'Nada encontrado na lixeira',
		'featured_image'        => 'Foto em Destaque',
		'set_featured_image'    => 'Selecionar Foto em Destaque',
		'remove_featured_image' => 'Remover Foto em Destaque',
		'use_featured_image'    => 'Usar Foto em Destaque',
		'insert_into_item'      => 'Inserir',
		'uploaded_to_this_item' => 'Atualizar',
		'items_list'            => 'Lista',
		'items_list_navigation' => 'Navegar',
		'filter_items_list'     => 'Filtrar',
	);
	$args = array(
		'label'                 => 'Moto Nova',
		'description'           => 'Motos Novas',
		'labels'                => $labels,
		'supports'              => array( 'title', 'editor', 'thumbnail' ),
		'taxonomies'            => array( 'novas-categoria', 'novas-tag' ),
		'hierarchical'          => false,
		'public'                => true,
		'show_ui'               => true,
		'show_in_menu'          => true,
		'menu_position'         => 20,
		'menu_icon'             => 'dashicons-star-filled',
		'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_Novas_Controller',
	);
	register_post_type( 'novas', $args );

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