TAXONOMIA NOTICIAS CPT 2018
if ( ! function_exists( 'taxonomia_categoria_noticia' ) ) {
// Register Custom Taxonomy
function taxonomia_categoria_noticia() {
$labels = array(
'name' => _x( 'categorias', 'Taxonomy General Name', 'taxonomia_categoria_noticia' ),
'singular_name' => _x( 'categoria', 'Taxonomy Singular Name', 'taxonomia_categoria_noticia' ),
'menu_name' => __( 'categoria noticia', 'taxonomia_categoria_noticia' ),
'all_items' => __( 'todas las categorias', 'taxonomia_categoria_noticia' ),
'parent_item' => __( 'categoria padre', 'taxonomia_categoria_noticia' ),
'parent_item_colon' => __( 'Parent Item:', 'taxonomia_categoria_noticia' ),
'new_item_name' => __( 'nueva categoria noticia', 'taxonomia_categoria_noticia' ),
'add_new_item' => __( 'Añadir nueva categoria', 'taxonomia_categoria_noticia' ),
'edit_item' => __( 'Editar categoria', 'taxonomia_categoria_noticia' ),
'update_item' => __( 'actualiza categoria', 'taxonomia_categoria_noticia' ),
'view_item' => __( 'ver categoria', 'taxonomia_categoria_noticia' ),
'separate_items_with_commas' => __( 'Separate items with commas', 'taxonomia_categoria_noticia' ),
'add_or_remove_items' => __( 'Añadir o borra categoria', 'taxonomia_categoria_noticia' ),
'choose_from_most_used' => __( 'Choose from the most used', 'taxonomia_categoria_noticia' ),
'popular_items' => __( 'categoria populares', 'taxonomia_categoria_noticia' ),
'search_items' => __( 'buscar categoria', 'taxonomia_categoria_noticia' ),
'not_found' => __( 'Not Found', 'taxonomia_categoria_noticia' ),
'no_terms' => __( 'No items', 'taxonomia_categoria_noticia' ),
'items_list' => __( 'Items list', 'taxonomia_categoria_noticia' ),
'items_list_navigation' => __( 'Items list navigation', 'taxonomia_categoria_noticia' ),
);
$rewrite = array(
'slug' => 'categoria-noticia',
'with_front' => false,
'hierarchical' => false,
);
$args = array(
'labels' => $labels,
'hierarchical' => true,
'public' => true,
'show_ui' => true,
'show_admin_column' => true,
'show_in_nav_menus' => true,
'show_tagcloud' => false,
'query_var' => 'categoria_noticia',
'rewrite' => $rewrite,
);
register_taxonomy( 'categoria-noticias', array( 'dlanau_noticias' ), $args );
}
add_action( 'init', 'taxonomia_categoria_noticia', 0 );
}