Or, embed this snippet using GenerateWP WordPress Plugin.

Download

Clone

PORTAFOLIO

// Register Custom Post Type
function custom_post_type() {

	$labels = array(
		'name'                  => _x( 'Portafolios', 'Post Type General Name', 'text_domain' ),
		'singular_name'         => _x( 'Portafolio', 'Post Type Singular Name', 'text_domain' ),
		'menu_name'             => __( 'Portafolio', 'text_domain' ),
		'name_admin_bar'        => __( 'Portafolios', 'text_domain' ),
		'archives'              => __( 'Registros', 'text_domain' ),
		'attributes'            => __( 'Atributos De Los Registros', 'text_domain' ),
		'parent_item_colon'     => __( 'Registro Padre', 'text_domain' ),
		'all_items'             => __( 'Todos Los Proyectos Registrados', 'text_domain' ),
		'add_new_item'          => __( 'Añade Un Nuevo Registro de Proyecto', 'text_domain' ),
		'add_new'               => __( 'Registra Un Nuevo Proyecto', 'text_domain' ),
		'new_item'              => __( 'Nuevo Registro De Proyecto', 'text_domain' ),
		'edit_item'             => __( 'Editar Proyecto', 'text_domain' ),
		'update_item'           => __( 'Actualizar Registro De Proyecto', 'text_domain' ),
		'view_item'             => __( 'Vizualizar Proyecto', 'text_domain' ),
		'view_items'            => __( 'Vizualizar Proyectos', 'text_domain' ),
		'search_items'          => __( 'Buscar Proyecto Registrado', 'text_domain' ),
		'not_found'             => __( 'Proyecto No Encontrado', 'text_domain' ),
		'not_found_in_trash'    => __( 'Proyecto No Encontrado En Papelera', 'text_domain' ),
		'featured_image'        => __( 'Imagen Destacada', 'text_domain' ),
		'set_featured_image'    => __( 'Insertar Imagen Destacada', 'text_domain' ),
		'remove_featured_image' => __( 'Eliminar Imagen Destacada', 'text_domain' ),
		'use_featured_image'    => __( 'Usar Como Eliminar Imagen Destacada', 'text_domain' ),
		'insert_into_item'      => __( 'Insertar Dentro del Registro De Proyecto', 'text_domain' ),
		'uploaded_to_this_item' => __( 'Actualizado Para Este Registro De Proyecto', 'text_domain' ),
		'items_list'            => __( 'Lista de Registro De proyectos', 'text_domain' ),
		'items_list_navigation' => __( 'Navegación De La Lista De Registro De Proyectos', 'text_domain' ),
		'filter_items_list'     => __( 'Filtrar Registro De Proyectos', 'text_domain' ),
	);
	$rewrite = array(
		'slug'                  => 'portafolio',
		'with_front'            => true,
		'pages'                 => true,
		'feeds'                 => true,
	);
	$capabilities = array(
		'edit_post'             => 'editar_portafolio',
		'read_post'             => 'leer_portafolio',
		'delete_post'           => 'eliminar_portafolio',
		'edit_posts'            => 'editar_portafolios',
		'edit_others_posts'     => 'editar_otros_portafolio',
		'publish_posts'         => 'publicar_portafolios',
		'read_private_posts'    => 'leer_portafolio_privado',
	);
	$args = array(
		'label'                 => __( 'Portafolio', 'text_domain' ),
		'description'           => __( 'Portafolio del equipo de InterConexo', 'text_domain' ),
		'labels'                => $labels,
		'supports'              => array( 'title', 'editor', 'thumbnail', 'comments', 'trackbacks', 'revisions', 'custom-fields', 'page-attributes', 'post-formats' ),
		'taxonomies'            => array( 'category', 'post_tag' ),
		'hierarchical'          => false,
		'public'                => true,
		'show_ui'               => true,
		'show_in_menu'          => true,
		'menu_position'         => 5,
		'menu_icon'             => 'dashicons-portfolio',
		'show_in_admin_bar'     => true,
		'show_in_nav_menus'     => true,
		'can_export'            => true,
		'has_archive'           => 'portafolio_proyectos',
		'exclude_from_search'   => false,
		'publicly_queryable'    => true,
		'rewrite'               => $rewrite,
		'capabilities'          => $capabilities,
	);
	register_post_type( 'portafolio', $args );

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