Or, embed this snippet using GenerateWP WordPress Plugin.

Download

Clone

Proyectos Tomás Amat

// Register Custom Post Type
function mt_proyectos() {

	$labels = array(
		'name'                  => _x( 'Proyectos', 'Post Type General Name', 'modern_talking' ),
		'singular_name'         => _x( 'Proyecto', 'Post Type Singular Name', 'modern_talking' ),
		'menu_name'             => __( 'Proyectos', 'modern_talking' ),
		'name_admin_bar'        => __( 'Proyectos', 'modern_talking' ),
		'archives'              => __( 'Archivo de proyectos', 'modern_talking' ),
		'attributes'            => __( 'Atributos del proyecto', 'modern_talking' ),
		'parent_item_colon'     => __( 'Proyecto padre', 'modern_talking' ),
		'all_items'             => __( 'Todos los proyectos', 'modern_talking' ),
		'add_new_item'          => __( 'Añadir nuevo proyecto', 'modern_talking' ),
		'add_new'               => __( 'Añadir nuevo', 'modern_talking' ),
		'new_item'              => __( 'Nuevo proyecto', 'modern_talking' ),
		'edit_item'             => __( 'Editar proyecto', 'modern_talking' ),
		'update_item'           => __( 'Actualizar proyecto', 'modern_talking' ),
		'view_item'             => __( 'Ver proyecto', 'modern_talking' ),
		'view_items'            => __( 'Ver proyectos', 'modern_talking' ),
		'search_items'          => __( 'Buscar proyectos', 'modern_talking' ),
		'not_found'             => __( 'Nada encontrado', 'modern_talking' ),
		'not_found_in_trash'    => __( 'No se encuentra en la papelera', 'modern_talking' ),
		'featured_image'        => __( 'Imagen destacada', 'modern_talking' ),
		'set_featured_image'    => __( 'Establecer imagen destacada', 'modern_talking' ),
		'remove_featured_image' => __( 'Eliminar imagen destacada', 'modern_talking' ),
		'use_featured_image'    => __( 'usar como imagen destacada', 'modern_talking' ),
		'insert_into_item'      => __( 'Insertar en el elemento', 'modern_talking' ),
		'uploaded_to_this_item' => __( 'Subir a este proyecto', 'modern_talking' ),
		'items_list'            => __( 'Lista de elementos', 'modern_talking' ),
		'items_list_navigation' => __( 'Lista de elementos de navegación', 'modern_talking' ),
		'filter_items_list'     => __( 'Filtrar lista de elementos', 'modern_talking' ),
	);
	$rewrite = array(
		'slug'                  => 'proyecto',
		'with_front'            => true,
		'pages'                 => true,
		'feeds'                 => true,
	);
	$args = array(
		'label'                 => __( 'Proyecto', 'modern_talking' ),
		'description'           => __( 'Proyectos de arquitectura desarrollados', 'modern_talking' ),
		'labels'                => $labels,
		'supports'              => array( 'title', 'editor', 'thumbnail', 'page-attributes' ),
		'hierarchical'          => true,
		'public'                => true,
		'show_ui'               => true,
		'show_in_menu'          => true,
		'menu_position'         => 5,
		'menu_icon'             => 'dashicons-admin-multisite',
		'show_in_admin_bar'     => true,
		'show_in_nav_menus'     => true,
		'can_export'            => true,
		'has_archive'           => 'proyectos',
		'exclude_from_search'   => false,
		'publicly_queryable'    => true,
		'rewrite'               => $rewrite,
		'capability_type'       => 'page',
	);
	register_post_type( 'mt_proyectos', $args );

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