Or, embed this snippet using GenerateWP WordPress Plugin.

Download

Clone

Turmas Raro Training

// Register Custom Post Type
function custom_post_turmas() {

	$labels = array(
		'name'                  => _x( 'Turmas', 'Post Type General Name', 'text_domain' ),
		'singular_name'         => _x( 'Turma', 'Post Type Singular Name', 'text_domain' ),
		'menu_name'             => __( 'Turmas', 'text_domain' ),
		'name_admin_bar'        => __( 'Turmas', 'text_domain' ),
		'archives'              => __( 'Item Archives', 'text_domain' ),
		'parent_item_colon'     => __( 'Parent Item:', 'text_domain' ),
		'all_items'             => __( 'Todas as Turmas', 'text_domain' ),
		'add_new_item'          => __( 'Add Nova Turma', 'text_domain' ),
		'add_new'               => __( 'Add Nova', 'text_domain' ),
		'new_item'              => __( 'Nova Turma', 'text_domain' ),
		'edit_item'             => __( 'Editar Turma', 'text_domain' ),
		'update_item'           => __( 'Atualizar Turma', 'text_domain' ),
		'view_item'             => __( 'Ver Turma', 'text_domain' ),
		'search_items'          => __( 'Buscar Turma', 'text_domain' ),
		'not_found'             => __( 'Not found', 'text_domain' ),
		'not_found_in_trash'    => __( 'Not found in Trash', 'text_domain' ),
		'featured_image'        => __( 'Imagem Destacada', 'text_domain' ),
		'set_featured_image'    => __( 'Inserir imagem destacada', 'text_domain' ),
		'remove_featured_image' => __( 'Remover imagem destacada', 'text_domain' ),
		'use_featured_image'    => __( 'Usar como imagem destacada', 'text_domain' ),
		'insert_into_item'      => __( 'Inserir dentro de Turma', 'text_domain' ),
		'uploaded_to_this_item' => __( 'Uploaded para esta turma', 'text_domain' ),
		'items_list'            => __( 'Lista de Turmas', 'text_domain' ),
		'items_list_navigation' => __( 'Navegação de Turmas', 'text_domain' ),
		'filter_items_list'     => __( 'Filtro de Turmas', 'text_domain' ),
	);
	$rewrite = array(
		'slug'                  => 'proximas-turmas',
		'with_front'            => true,
		'pages'                 => true,
		'feeds'                 => true,
	);
	$args = array(
		'label'                 => __( 'Turma', 'text_domain' ),
		'description'           => __( 'Próximas Turmas', 'text_domain' ),
		'labels'                => $labels,
		'supports'              => array( 'title', 'editor', 'thumbnail', ),
		'hierarchical'          => false,
		'public'                => true,
		'show_ui'               => true,
		'show_in_menu'          => true,
		'menu_position'         => 5,
		'show_in_admin_bar'     => true,
		'show_in_nav_menus'     => true,
		'can_export'            => true,
		'has_archive'           => true,		
		'exclude_from_search'   => false,
		'publicly_queryable'    => true,
		'rewrite'               => $rewrite,
		'capability_type'       => 'post',
	);
	register_post_type( 'post_turmas', $args );

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