Wordpress (Custom) Post Type, Taxonomy, Tags, Term In One Image
I know that for wordpress beginner, it is quite difficult at first to understand the real relationship between (Custom) post type, taxonomy , tags, category, terms and so on.
Yes, I have been there and now I understand it. That's why I create the below image to illustrate it all, in order to cut time to learn it from here, which is not very clear. It would be very useful for people who write wordpress program also.
|Wordpress (Custom) Post Type, Taxonomy, Tags, Term in One Image|
How to read it?
I use default value in wordpress and custom post type to illustrate the idea.
This image is read from left to right.
The highlight doesn't mean anything, just to split it so that you can read it clearly only.
Wordpress default post type includes, at least, post and page. But post type is not limited to post and pages, it can also be other thing (known as "Custom Post Type"). Cars, Food, Sports and other thing can also be post type.
How To Structure? / Taxonomy and Term
Most of the people (Me included) failed on this part.
According to wordpress, taxonomy is used to group things together. Actually there are two ways to do it.
In hierarchy, you can group things in a parent/child relationship. In above image, "Toyota" and "Honda" are child of "Family Car". In wordpress, "Undefined" is child of "Category".
"Toyota", "Honda", "Undefine" are terms.
In Flat, you can group things in a "Flat" way, which means you can give something (a blog post for example) one or multiple "definition" or "meaning". And those "meanings" does not need to have any relationship between them.
For example, "Mountain", "free", and "sunset" are not related to each other, but they are all used to defined the blog post "Hiking".
In wordpress, we use "tag" to describe a post. "hihi" is a term, just like "sunset" and "Mountain" did.
This is the actual blog post itself.
If it is a custom post, it is the actual item that contains all the contents, image and so on. In wordpress, to define this item (no matter it is a custom post type or not), it all has a "post ID" to identify them.
All the taxonomy and terms are used to group/describe this actual items.
Why people fail to understand it?
From my point of view: there are two reasons why people did not know it:
- Example is not clear enough
- Does not include "Item"
For #2, since in official page "Item" is not included, most people cannot associate a "term" with an actual blog post. That's why the problem exists.
I hope this can help someone to understand those terms clearly.