重用Wordpress类别(Reuse Wordpress Category)

编程入门 行业动态 更新时间:2024-10-26 16:29:21
重用Wordpress类别(Reuse Wordpress Category)

我的博客有一个类别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: enter image description here

更多推荐

本文发布于:2023-08-07 15:20:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1464718.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:类别   Wordpress   Category   Reuse

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!