我的博客有一个类别slug podcast ,从一段时间以来改变了entcast 。
今天,我想重复使用entcast slug,但我不能用这个名字创建一个类别,因为wp说我已经有了这个名字。 我认为wp会保留一个旧的注册表,就像它对帖子历史一样。
我的问题是:
我该怎么做才能重新使用entcast slug? 是否存在丢失数据的风险?我认为这种改变应该在数据库本身完成,所以这就是第二个问题。
My blog has a category slug podcast that was changed from entcast some time ago.
Today, I want to reuse the entcast slug, but I can't create a category with this name, since wp says me there is already that one. I think wp keeps an old registry, just like it does for the post history.
My questions are:
What should I do to reutilize the entcast slug? Is there some risk of losing data with that?As I do think this change should be done in database itself, so this is why the second question.
最满意答案
您必须检查WordPress数据库中的wp_terms以查看哪个类别使用此slug。 请注意所有类别都使用术语(这就是数据库表称为wp_terms的原因)。 术语基本上是名称(显示名称)和子弹(ID名称)的关联。 因此,如果没有类别使用slug“entcast”,那并不意味着slug不被其他分类法(例如标签)使用。 最好的方法是检查WordPress MySQL数据库中的wp_terms表。 如果另一个分类法使用相同的slug,你将不得不去使用这个slug的每个分类法并改变它以使它再次“自由”。 请参阅此图片以说明WordPress对术语和分类法的使用:
You have to check in wp_terms in your WordPress database to see what category uses this slug. Beware that all categories use terms (this is why the database table is called wp_terms). And a term is basically the association of a Name (display name) and a slug (ID name). So if no category uses the slug "entcast" it does not mean that the slug is not used by another taxonomy (like tags, for example). The best way to be sure is to check the wp_terms table in your WordPress MySQL database. If another taxonomy uses the same slug, you will have to go to each and every taxonomy that uses this slug and change it so it becomes "free" again. See this image to illustrate WordPress use of terms and taxonomies:
更多推荐
发布评论