分类法和类别之间有区别吗?
-
-
我认为您应该为自定义帖子类型创建自定义分类法,而不要使用本机类别,这样可以减少混乱.I think you should create custom taxonomies for custom post types rather than use the native categories so its less confusing.
- 0
- 2015-07-31
- Brad Dalton
-
3 个回答
- 投票数
-
- 2014-08-18
Taxonomies,如前所述是以下内容的统称
-
category
-
post_tag
-
post_format
-
link_category
-
自定义分类
前四个是内置分类法,而自定义分类法是用户使用
register_taxonomy
.自定义分类法可以是分层的(例如内置分类法category
),也可以不是(例如帖子标签)您在"帖子"屏幕下在后端中创建的类别和标签实际上是分类法
category
和post_tag
您不能在
post_format
中创建其他条款.post_format
具有类似post_format_video
,post_format_gallery
等的术语.有关所有包含的帖子格式,请参见法典编辑
我已经更新了法典中的 Taxonomies 页面,以包含我的图表和缺少的
post_format
分类法Taxonomies, as previously described are a collective noun for the following
category
post_tag
post_format
link_category
custom taxonomy
The first four are built-in taxonomies, while custom taxonomies are taxonomies that are manually created by the user with
register_taxonomy
. Custom Taxonomies can be hierarchical (like the build-in taxonomycategory
) or not (like post tags)The categories and tags that you create in the back end under the 'Posts' screen are in actual fact terms of the taxonomies
category
andpost_tag
You cannot create extra terms in
post_format
.post_format
have the build in terms likepost_format_video
,post_format_gallery
etc. See the codex for all post formats includedEDIT
I have updated the Taxonomies page in the codex to include my diagram and the missing
post_format
taxonomy-
+1.只是一点点花哨的事情:甚至内置的分类法都是通过`register_taxonomy`创建的.[2次](https://github.com/WordPress/WordPress/blob/master/wp-settings.php#L205).:)+1. Just a bit of pedantry: even built-in taxonomies are created via `register_taxonomy`. [2 times](https://github.com/WordPress/WordPress/blob/master/wp-settings.php#L205). :)
- 3
- 2014-08-18
- gmazzap
-
Jip,但是它们不是由用户手动创建的.不过,请看您的意思,我实际上应该在回答中添加该特定细节.:-) 非常感谢Jip, but they aren't manually created by the user. See your point though, I actually should have added that specific detail in my answer. :-) Many thanks
- 0
- 2014-08-18
- Pieter Goosen
-
老实说,我添加了评论,以免错过对WordPress帖子类型和分类法双重愚蠢注册的机会:DTo be honest I added the comments to not miss the opportunity to tease WordPress about that stupid double registration of post types and taxonomies :D
- 0
- 2014-08-18
- gmazzap
-
如果单击图像@goose会增加尺寸,会更好.Would be better if when you click the image @goose, it increases in size.
- 1
- 2014-08-18
- Brad Dalton
-
@GM哈哈哈,看到所有这些笑话.就像两次吃同一块肉一样@G.M. hahaha, see the joke in all of this. It's like eating the same piece of meat twice
- 1
- 2014-08-18
- Pieter Goosen
-
- 2014-08-17
类别,标记,链接类别和帖子格式是基于分类法构建的.
来自食典
基本上,分类法是将事物组合在一起的一种方式.
分类法中不同组的名称称为术语.以动物分组为例,我们可以将一组称为"鸟",而将另一组称为"鱼"."鱼"和"鸟"是我们分类法中的术语.作为WordPress的示例,类别或标签(请参阅下一节)是一个术语.
Category, Tag, Link Category and Post Formats are built in taxonomies.
From Codex
Basically, a taxonomy is a way to group things together.
The names for the different groupings in a taxonomy are called terms. Using groupings of animals as an example, we might call one group "birds", and another group "fish". "Fish" and "birds" are terms in our taxonomy. As an example from WordPress, a category or tag (see next section) is a term.
-
- 2017-03-07
Category
是WordPress中内置的taxonomy
之一.因此,要弄清楚事情:分类法是将事情组合在一起的一种方法.
我们可以像内置的一样在WordPress中创建自定义分类法.例如
Cars
可以是具有terms
之类的分类法Audi Toyota Benz Mazda
主要有两种可用的分类法,分别是
hierarchical
和non hierarchical
Category
是分层分类法的最佳示例,而Tag
是非分层分类法的示例Category
is one of the built intaxonomy
in WordPress.so to clear things: taxonomy is a way to group things together.
we can create custom taxonomies in WordPress just like builtin ones. for example
Cars
could be a taxonomy withterms
likeAudi Toyota Benz Mazda
there are mainly two types of taxonomies available which are
hierarchical
andnon hierarchical
Category
is best example of hierarchical taxonomy andTag
is an example of non hierarchical taxonomy
我一直在仔细阅读WordPress的法典,对分类法是什么和类别是什么之间的模糊定义感到困惑.为此,术语也是在分类法描述中使用的单词,但似乎以暗示其不仅仅限于分类法的方式使用.
两者都被描述为对帖子进行分类和分组的一种方式.我确实知道分类法是类别的一种更一般的形式,但是它们之间如何精确地联系在一起?
我只是不介意有细微的差别吗?