Changing standard wordpress taxonomy

0

Currently the category pages of my site have the following taxonomy www.site.com/category/programa01; I can not change this taxonomy for program / program01. Is there any way to make this change?

    
asked by anonymous 28.06.2017 / 23:12

1 answer

0

1) You should change the label category, see example:

<?php 

function change_category_taxonomy_label() {
        global $wp_taxonomies;

    $labels = $wp_taxonomies['category']->labels;

    if(!empty($labels)){
        $search = array('Categories', 'Category', 'category');
        $replace = array('Programa01', 'Programa01', 'programa01');

        foreach ($labels as $key => $label) {
            $label = str_replace($search, $replace, $label);
            $wp_taxonomies['category']->labels->$key = $label;
        }
    }
    $wp_taxonomies['category']->label = 'Programa01';

 }

 function jwh_manage_columns( $columns ) {
    $columns['categories'] = 'Programa01';
       return $columns;
}

function jwh_column_init() {
  add_filter( 'manage_posts_columns' , 'jwh_manage_columns' );
}
add_action( 'admin_init' , 'jwh_column_init' );

2) Or you can create a custom taxonomy. Just check the manual:

https://codex.wordpress.org/Taxonomies
    
29.06.2017 / 00:06