Created
July 13, 2016 06:09
-
-
Save javierarcheni/3c208fddf55aeac03c007422cf14eb9b to your computer and use it in GitHub Desktop.
Crear una taxonomía tipo categoría llamada Series para hacer colecciones de artículos
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
add_action( 'init', 'define_series_taxonomy' ); | |
function define_series_taxonomy() { | |
$labels = array( | |
'name' => 'Serie', | |
'singular_name' => 'Serie', | |
'search_items' => 'Buscar Series', | |
'all_items' => 'Todos los Series', | |
'parent_item' => 'Serie Superior', | |
'parent_item_colon' => 'Serie Superior:', | |
'edit_item' => 'Editar Serie', | |
'update_item' => 'Actualizar Serie', | |
'add_new_item' => 'Añadir Nueva Serie', | |
'new_item_name' => 'Nuevo Nombre de Serie', | |
'menu_name' => 'Series' | |
); | |
$args = array( | |
'hierarchical' => true, | |
'labels' => $labels, | |
'show_ui' => true, | |
'show_admin_column' => true, | |
'query_var' => true, | |
'rewrite' => array( 'slug' => 'series' ) | |
); | |
register_taxonomy( 'series', array('post'), $args ); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment