2014-04-17 44 views
0

我有一个帖子列表,每个帖子分配给一个或多个类别。Wordpress类别URL路径更改

当我在观看组别的页面帖子列表中,URL路径是:

url.com/Category1

但是我有一个两个第1类和2类分类下一个职位。当我点击该帖子时,url路径变为url.com/Category2/postName

我的问题是如何使它,以便当我在Category1中查看帖子时,路径将保持url.com/Category1/postName而不是更改为其他标记的类别。

回答

0

根据官方WordPress documentation

When you assign multiple categories to a post, only one can show up in the permalink. The categories are ordered alphabetically. In each group of sub-categories the order will also be alphabetical. (see Manage Categories). The post will still be accessible through all the categories as normal. 

因此,只要你会指定多个类别,以单篇文章,WordPress会自动选择其中的一个类别,用于创建后URL(记得类别按字母顺序排列,并选择将基于此)。

您可以通过始终将单个类别分配到帖子来避免此情况。