Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/wordpress/11.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php Wordpress:如何重命名/重写分类名称_Php_Wordpress_Taxonomy_Custom Taxonomy - Fatal编程技术网

Php Wordpress:如何重命名/重写分类名称

Php Wordpress:如何重命名/重写分类名称,php,wordpress,taxonomy,custom-taxonomy,Php,Wordpress,Taxonomy,Custom Taxonomy,我在wordpress函数中创建了以下分类法: add_action( 'init', 'create_book_tax' ); function create_book_tax() { register_taxonomy( 'site_players',//taxonomy name array( 'milan','manu),//CP name array( 'label' => __( 'Players' ), 'rewrit

我在wordpress函数中创建了以下分类法:

add_action( 'init', 'create_book_tax' );

function create_book_tax() {
register_taxonomy(
    'site_players',//taxonomy name
    array( 'milan','manu),//CP name
    array(
        'label' => __( 'Players' ),
        'rewrite' => array( 'slug' => 'players' ),
        'hierarchical' => true,
        'show_in_nav_menus'    => true,
        'show_admin_column'    => true,
    )
);


 }


 add_action( 'init', 'codex_custom_init' );
现在我需要重新命名或更好地重写它,将名称更改为站点\u no\u players
在WP中有一种方法可以做到这一点吗?

你是说在为该分类添加了术语之后?在注册分类和添加了术语之后……slug……我原以为你需要进入数据库并更新每个术语的分类。毫无疑问,有某种东西(可能是一个插件)可以帮你做到这一点,但我不是100%确定它会更新数据库。我只是进入数据库,对任何需要更新的内容进行
更新
查询。你的意思是在为该分类添加了术语之后?在注册分类和添加术语之后……slug……我原以为你需要进入数据库并更新每个术语的分类。毫无疑问,有某种东西(可能是一个插件)可以帮你做到这一点。在@George上进行扩展,但我不是100%确定它会更新数据库。我只是进入数据库,对需要更新的任何内容进行
更新
查询。