問題描述
我一直在閱讀 WordPress 的法典,並且對分類法與什麼類別之間的模糊定義感到困惑。對於這個問題,術語也是在分類法的描述中使用的一個詞,但似乎以暗示它不僅僅侷限於分類學的方式使用。
兩者都被描述為一種分類和組合帖子的方式。我明白分類法是一個更一般的類別,但它們是如何相互關聯的?
有沒有微妙的區別我只是沒有拿起來?
最佳解決方案
如前所述,分類法是以下的集體名詞
-
category -
post_tag -
post_format -
link_category - 自定義分類法
前四個是 built-in 分類法,而自定義分類法是使用者使用 register_taxonomy 手動建立的分類法。自定義分類法可以是分層的 (如 build-in 分類法 category)(不像帖子標籤)
您在’Posts’ 螢幕後端建立的類別和標籤實際上分類為 category 和 post_tag
您不能在 post_format 中建立額外的術語。 post_format 具有 post_format_video,post_format_gallery 等等的功能。
編輯
我更新了程式碼中的 Taxonomies 頁面,以包括我的圖表和缺少的 post_format 分類法
次佳解決方案
類別,標籤,連結類別和帖子格式都建立在分類法中。
來自 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.
參考文獻
注:本文內容整合自 Google/Baidu/Bing 輔助翻譯的英文資料結果。如果您對結果不滿意,可以加入我們改善翻譯效果:薇曉朵技術論壇。
