标签';s id而不是链接中的名称,wordpress

标签';s id而不是链接中的名称,wordpress,wordpress,permalinks,taxonomy,Wordpress,Permalinks,Taxonomy,我正在使用分类法创建数据库。所有带有标签名称的链接。可以让标签在链接中使用其id吗 在function.php中,我使用 register_taxonomy( 'game', 'post', array( 'hierarchical' => false, 'label' => __('Game', 'series'), 'query_var' => 'game', 'rewrite' => array( 'slug' => 'Games' ) ) ); 第页 &l

我正在使用分类法创建数据库。所有带有标签名称的链接。可以让标签在链接中使用其id吗

在function.php中,我使用

register_taxonomy( 'game', 'post', array( 'hierarchical' => false, 'label' => __('Game', 'series'), 'query_var' => 'game', 'rewrite' => array( 'slug' => 'Games' ) ) );
第页

<?php echo get_the_term_list( $post->ID, 'game', 'Games: ', ', ', '' ); ?>

现在链接看起来像 http://*.com/games/clams of clams/

我需要它们看起来像
http://*.com/games/123/

在永久链接设置中使用数字结构。看

或者,您可以使用
自定义结构
并在字段中使用
%category%/%post\u id%