Or, embed this snippet using GenerateWP WordPress Plugin.

Download

Clone

Post Type Persona

// Register Custom Post Type
function persona_post_type() {

	$labels = array(
		'name'                  => _x( 'Personas', 'Post Type General Name', 'twenty-sixteen' ),
		'singular_name'         => _x( 'Persona', 'Post Type Singular Name', 'twenty-sixteen' ),
		'menu_name'             => __( 'Personas', 'twenty-sixteen' ),
		'name_admin_bar'        => __( 'Personas', 'twenty-sixteen' ),
		'archives'              => __( 'Archivo de Personas', 'twenty-sixteen' ),
		'parent_item_colon'     => __( 'Parent Item:', 'twenty-sixteen' ),
		'all_items'             => __( 'Todas las Personas', 'twenty-sixteen' ),
		'add_new_item'          => __( 'Nueva Persona', 'twenty-sixteen' ),
		'add_new'               => __( 'Nueva Persona', 'twenty-sixteen' ),
		'new_item'              => __( 'Nueva Personaq', 'twenty-sixteen' ),
		'edit_item'             => __( 'Editar Persona', 'twenty-sixteen' ),
		'update_item'           => __( 'Actualizar Persona', 'twenty-sixteen' ),
		'view_item'             => __( 'Ver Persona', 'twenty-sixteen' ),
		'search_items'          => __( 'Buscar Personasq', 'twenty-sixteen' ),
		'not_found'             => __( 'No encontrado', 'twenty-sixteen' ),
		'not_found_in_trash'    => __( 'No encontrado en papelera', 'twenty-sixteen' ),
		'featured_image'        => __( 'Foto', 'twenty-sixteen' ),
		'set_featured_image'    => __( 'Establecer foto', 'twenty-sixteen' ),
		'remove_featured_image' => __( 'Quitar foto', 'twenty-sixteen' ),
		'use_featured_image'    => __( 'Usar como foto de la persona', 'twenty-sixteen' ),
		'insert_into_item'      => __( 'Insertar', 'twenty-sixteen' ),
		'uploaded_to_this_item' => __( 'Subido a esta persona', 'twenty-sixteen' ),
		'items_list'            => __( 'Listado de personas', 'twenty-sixteen' ),
		'items_list_navigation' => __( '', 'twenty-sixteen' ),
		'filter_items_list'     => __( '', 'twenty-sixteen' ),
	);
	$args = array(
		'label'                 => __( 'Persona', 'twenty-sixteen' ),
		'description'           => __( 'Autores, Responsables, Directores, etc.', 'twenty-sixteen' ),
		'labels'                => $labels,
		'supports'              => array( 'title', 'editor', 'revisions', ),
		'hierarchical'          => false,
		'public'                => true,
		'show_ui'               => true,
		'show_in_menu'          => true,
		'menu_position'         => 5,
		'menu_icon'             => 'dashicons-admin-users',
		'show_in_admin_bar'     => true,
		'show_in_nav_menus'     => true,
		'can_export'            => true,
		'has_archive'           => true,		
		'exclude_from_search'   => true,
		'publicly_queryable'    => true,
		'capability_type'       => 'page',
	);
	register_post_type( 'persona', $args );

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