Created
June 13, 2019 19:34
-
-
Save DarioBF/1ab936559a2fdcdeb4282215fc8431e4 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Añado otra taxonomía, esta vez no es jerárquica, como las etiquetas. | |
$labels = array( | |
'name' => _x( 'Escritores', 'taxonomy general name' ), | |
'singular_name' => _x( 'Escritor', 'taxonomy singular name' ), | |
'search_items' => __( 'Buscar Escritores' ), | |
'popular_items' => __( 'Escritores populares' ), | |
'all_items' => __( 'Todos los escritores' ), | |
'parent_item' => null, | |
'parent_item_colon' => null, | |
'edit_item' => __( 'Editar Escritor' ), | |
'update_item' => __( 'Actualizar Escritor' ), | |
'add_new_item' => __( 'Añadir nuevo Escritor' ), | |
'new_item_name' => __( 'Nombre del nuevo Escritor' ), | |
'separate_items_with_commas' => __( 'Separar Escritores por comas' ), | |
'add_or_remove_items' => __( 'Añadir o eliminar Escritores' ), | |
'choose_from_most_used' => __( 'Escoger entre los Escritores más utilizados' ) | |
); | |
register_taxonomy( 'escritor', 'libro', array( | |
'hierarchical' => false, | |
'labels' => $labels, /* ADVERTENCIA: Aquí es donde se utiliza la variable $labels */ | |
'show_ui' => true, | |
'query_var' => true, | |
'rewrite' => array( 'slug' => 'escritor' ), | |
)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment