Or, embed this snippet using GenerateWP WordPress Plugin.

Download

Clone

Portfólio

// Register Custom Post Type
function claudio_puga_portfolios_post_type() {

	$labels = array(
		'name'                => _x( 'Portfólios', 'Post Type General Name', 'claudio-puga' ),
		'singular_name'       => _x( 'Portfólio', 'Post Type Singular Name', 'claudio-puga' ),
		'menu_name'           => __( 'Portfólio', 'claudio-puga' ),
		'name_admin_bar'      => __( 'Portfólio', 'claudio-puga' ),
		'parent_item_colon'   => __( 'Projeto pai:', 'claudio-puga' ),
		'all_items'           => __( 'Todos os projetos', 'claudio-puga' ),
		'add_new_item'        => __( 'Adicionar novo projeto', 'claudio-puga' ),
		'add_new'             => __( 'Novo projeto', 'claudio-puga' ),
		'new_item'            => __( 'Novo projeto', 'claudio-puga' ),
		'edit_item'           => __( 'Editar projeto', 'claudio-puga' ),
		'update_item'         => __( 'Atualizar projeto', 'claudio-puga' ),
		'view_item'           => __( 'Visualizar projeto', 'claudio-puga' ),
		'search_items'        => __( 'Buscar projeto', 'claudio-puga' ),
		'not_found'           => __( 'Projeto não encontrado', 'claudio-puga' ),
		'not_found_in_trash'  => __( 'Projeto não encontrado no lixo', 'claudio-puga' ),
	);
	$args = array(
		'label'               => __( 'Portfólio', 'claudio-puga' ),
		'description'         => __( 'Projetos referenciais', 'claudio-puga' ),
		'labels'              => $labels,
		'supports'            => array( 'title', 'editor', 'thumbnail', ),
		'taxonomies'          => array( 'project_type' ),
		'hierarchical'        => false,
		'public'              => true,
		'show_ui'             => true,
		'show_in_menu'        => true,
		'menu_position'       => 20,
		'menu_icon'           => 'dashicons-index-card',
		'show_in_admin_bar'   => true,
		'show_in_nav_menus'   => true,
		'can_export'          => true,
		'has_archive'         => 'projetos',
		'exclude_from_search' => false,
		'publicly_queryable'  => true,
		'capability_type'     => 'post',
	);
	register_post_type( 'portfolio', $args );

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