我的Wordpress默认类别有“新闻”类别术语。我创建了名为“艺术家”的自定义post类型,并创建了名为“类别”的自定义分类。现在,我在permalink部分设置的内容如下
custom structure - /news/%category%/%postname%/因为我想打开我所有的默认帖子打开‘新闻’弹。我创建了页面分类法-genre.php,这将导致所有类型分类学的发布。比方说,体裁分类器有“非洲流行”一词。现在,当我查看页面时,它会显示所有的'afro-pop‘的帖子,但问题是它有url。
http://localhost/mn2s-new/news/genre/afro-pop/我想要的是
http://localhost/mn2s-new/genre/afro-pop/我想删除分类法-genre.php页面的新闻片段。请帮助我,我正在尝试从2天,但没有找到任何解决办法。
发布于 2018-12-13 05:58:42
这是由分类法注册代码中的with_front参数控制的:
register_taxonomy(
'genre',
'artist',
array(
'rewrite' => array(
'slug' => 'genre',
'with_front' => false, // don't prepend static prefix from post permalink
),
// your other args...
)
);https://wordpress.stackexchange.com/questions/321807
复制相似问题