我创建了一个 CPT 和几个应用于此 CPT 的自定义分类法。
目前我的URL如下(使用插件(:
www.example.com/[cpt]/[分类学术语]/邮政
对于特定的cpt,我想移至:
www.example.com/[分类术语]/帖子
我怎样才能做到这一点?
如果你想有自定义 slug 而不[cpt]
自定义post_type,你需要在 args 数组中传递这个值
$args['rewrite'] = array(
'slug' => 'your-custom-post-type',
'with_front' => false,
),
在此更新之后,您的永久链接