Or, embed this snippet using GenerateWP WordPress Plugin.

Download

Clone

vtxrm-sp_function

// Register Custom Post Type
function vtxrm_sp_function_custom_post_type() {

	$labels = array(
		'name'                  => _x( 'SPs ou Functions', 'Post Type General Name', 'vtxrm_sp_function_custom_post_type_text' ),
		'singular_name'         => _x( 'SP ou Function', 'Post Type Singular Name', 'vtxrm_sp_function_custom_post_type_text' ),
		'menu_name'             => __( 'SP\\\'s e Functions', 'vtxrm_sp_function_custom_post_type_text' ),
		'name_admin_bar'        => __( 'SP\\\'s e Functions', 'vtxrm_sp_function_custom_post_type_text' ),
		'archives'              => __( 'Arquivo de Itens', 'vtxrm_sp_function_custom_post_type_text' ),
		'attributes'            => __( 'Atributos do Item', 'vtxrm_sp_function_custom_post_type_text' ),
		'parent_item_colon'     => __( 'Item Parente:', 'vtxrm_sp_function_custom_post_type_text' ),
		'all_items'             => __( 'Todos os Itens', 'vtxrm_sp_function_custom_post_type_text' ),
		'add_new_item'          => __( 'Adicionar novo Item', 'vtxrm_sp_function_custom_post_type_text' ),
		'add_new'               => __( 'Adicionar novo', 'vtxrm_sp_function_custom_post_type_text' ),
		'new_item'              => __( 'Adicionar novo', 'vtxrm_sp_function_custom_post_type_text' ),
		'edit_item'             => __( 'Editar Item', 'vtxrm_sp_function_custom_post_type_text' ),
		'update_item'           => __( 'Actualizar Item', 'vtxrm_sp_function_custom_post_type_text' ),
		'view_item'             => __( 'Ver Item', 'vtxrm_sp_function_custom_post_type_text' ),
		'view_items'            => __( 'Ver Itens', 'vtxrm_sp_function_custom_post_type_text' ),
		'search_items'          => __( 'Procurar item', 'vtxrm_sp_function_custom_post_type_text' ),
		'not_found'             => __( 'Não encontrado', 'vtxrm_sp_function_custom_post_type_text' ),
		'not_found_in_trash'    => __( 'Não encontrado no Lixo', 'vtxrm_sp_function_custom_post_type_text' ),
		'featured_image'        => __( 'Imagem de destaque', 'vtxrm_sp_function_custom_post_type_text' ),
		'set_featured_image'    => __( 'Definir imagem de destaque', 'vtxrm_sp_function_custom_post_type_text' ),
		'remove_featured_image' => __( 'Remover imagem de destaque', 'vtxrm_sp_function_custom_post_type_text' ),
		'use_featured_image'    => __( 'Usar como imagem de destaque', 'vtxrm_sp_function_custom_post_type_text' ),
		'insert_into_item'      => __( 'Inserir no Item', 'vtxrm_sp_function_custom_post_type_text' ),
		'uploaded_to_this_item' => __( 'Enviado para este item', 'vtxrm_sp_function_custom_post_type_text' ),
		'items_list'            => __( 'Lista de Itens', 'vtxrm_sp_function_custom_post_type_text' ),
		'items_list_navigation' => __( 'Navegação da lista de itens de', 'vtxrm_sp_function_custom_post_type_text' ),
		'filter_items_list'     => __( 'Filtrar lista de itens', 'vtxrm_sp_function_custom_post_type_text' ),
	);
	$args = array(
		'label'                 => __( 'SP ou Function', 'vtxrm_sp_function_custom_post_type_text' ),
		'description'           => __( 'VTXRM - Stored Procedure e Functions', 'vtxrm_sp_function_custom_post_type_text' ),
		'labels'                => $labels,
		'supports'              => array( 'title', 'editor', 'excerpt', 'author', 'comments', 'revisions', ),
		'taxonomies'            => array( 'category', 'post_tag', 'sp_function' ),
		'hierarchical'          => false,
		'public'                => true,
		'show_ui'               => true,
		'show_in_menu'          => true,
		'menu_position'         => 5,
		'menu_icon'             => 'dashicons-admin-post',
		'show_in_admin_bar'     => false,
		'show_in_nav_menus'     => true,
		'can_export'            => true,
		'has_archive'           => true,		
		'exclude_from_search'   => false,
		'publicly_queryable'    => true,
		'capability_type'       => 'post',
		'show_in_rest'          => true,
	);
	register_post_type( 'vtxrm_sp_function', $args );

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