我已经使用
register_taxonomy(
\'discipline\',
array(\'post\'), /* if you change the name of register_post_type( \'custom_type\', then you have to change this */
array(
\'hierarchical\' => true, /* if this is true it acts like categories */
\'labels\' => array(
\'name\' => __( \'Disciplines\' ), /* name of the custom taxonomy */
\'singular_name\' => __( \'Discipline\' ), /* single taxonomy name */
\'search_items\' => __( \'Search Disciplines\' ), /* search title for taxomony */
\'all_items\' => __( \'All Disciplines\' ), /* all title for taxonomies */
\'parent_item\' => __( \'Parent Discipline\' ), /* parent title for taxonomy */
\'parent_item_colon\' => __( \'Parent Discipline:\' ), /* parent taxonomy title */
\'edit_item\' => __( \'Edit Discipline\' ), /* edit custom taxonomy title */
\'update_item\' => __( \'Update Discipline\' ), /* update title for taxonomy */
\'add_new_item\' => __( \'Add New Discipline\' ), /* add new title for taxonomy */
\'new_item_name\' => __( \'New Discipline Name\' ) /* name title for taxonomy */
),
\'rewrite\' => array(
\'slug\' => \'discipline\',
\'with_front\' => false
),
\'show_ui\' => true,
\'query_var\' => true,
)
);
如果在permalinks页面中仅使用%postname%,则会得到如下URL:
无论什么com/专业/职位名称
我想获取要读取的URL
无论什么com/父术语名称/职位名称
我已经使用“Remove Taxonomy Base Slug”插件删除了discipline部分,但我不知道如何将术语名称包括在内,并使网站其他部分的永久链接不受影响。