什么是分类法?WordPress分类法解释插图

“what is taxonomy”? Taxonomy is an important part of classifying WordPress site content, but the term often confuses beginners because “taxonomy” is not what most of us hear in our daily lives. So. What is taxonomy? And, better yet, why should you care about the taxonomy on the WordPress site?

This is all you will learn in this entry. You can click any of the following links to jump directly to that section, or you can read through:

  • What is WordPress taxonomy?
  • What types of taxonomies does WordPress provide by default?
  • What is the difference between a category and a label?
  • How to display categories on your website
  • How to create your own custom classification

What is taxonomy? Why does taxonomy help?

In the simplest sense, the WordPress taxonomy is just a way to group related articles (or other content) together. That’s all! Although this is a big word, it is not as complicated as it sounds.

For example, if you have a blog about sports, you can create categories for different sports (football, basketball, cricket, and so on) and assign related articles to each category.

Taxonomies are helpful because they make it easier for readers to find relevant content (and also provide some context for your content, although this is a secondary benefit).

Think about it-if the people who visit the sample sports website above are only interested in basketball, wouldn’t it be helpful for them to quickly click on the category to see only basketball-related content? This is much better than letting them sift through a lot of content that has nothing to do with cricket, right?

If you think about it, you will realize that taxonomies are everywhere in your digital life, even if you don’t know their names. For example, if you go to Amazon, you may find it helpful to quickly click on TV and video categories instead of searching for millions of different products on Amazon.

Which taxonomies are supported by WordPress by default?

By default, WordPress includes two taxonomies for the public:

  • Category
  • Label

You will find these taxonomies on the right side of the WordPress editor:

什么是分类法?WordPress分类法解释插图1

Taxonomy in the WordPress Editor

You can add taxonomies directly from the WordPress editor. Alternatively, you can add or edit taxonomies (including permalink slugs) at any time by hovering over the articles option in the dashboard sidebar and selecting categories or tags.

什么是分类法?WordPress分类法解释插图2

How to manage taxonomy

What is the difference between a category and a label?

If you look at the screenshot of the WordPress editor above, you may notice that the interface for adding categories and tags is actually a little different.

Using categories, WordPress lists all the categories you have used, while the tag interface contains only a box for tagging.

There are actually several reasons for the different interface of each option. Let’s go a little deeper.

First of all, every article you write needs a category. Labels, on the other hand, are completely optional. Again:

  • Category-required
  • Label-optional

In addition, the category is hierarchical, while the label is not. Layering simply means that you can add subcategories to the parent category. Therefore, you can place categories in other categories, but you cannot do the same with tags.

When should I use categories and tags?

Whether you should use categories or tags depends largely on your expected scope of classification. Categories are designed to put your content together widely. It is common for the entire site to have less than 10 major categories. Many websites even use less than 5 categories!

On the other hand, tags can be so narrow that they apply only to specific articles. You will find that many websites use hundreds of different tags in the summary of all articles.

Let’s go back to the example of the sports website to illustrate this concept. Suppose you write an article about Michael Jordan. Here are some examples of taxonomies that you can use in the article:

  • Category: basketball (extensive)
  • Tag: Michael Jordan, Chicago Bulls (specific to article)

Can you assign multiple categories to articles?

Yes, you can assign multiple categories to articles. So a better question is, “should you assign multiple categories to an article?” . The answer there is a little vague.

You will find that both sides of the problem are in dispute.

As an accident, the use of multiple categories for articles is unlikely to cause serious harm. However, if you find that you almost need to assign multiple categories to each article you write, you may need to consider whether your category system is too narrow.

Possible solutions include converting narrower categories to subcategories or tags of broader categories (depending on how narrow the category is).

How to display WordPress taxonomy on your website

Thanks to the WordPress gadget, you can easily display your tags and categories at the front of the site.

To do this, all you need to do is go to the appearance → gadget and drag one (or both) of the category and tag cloud gadgets (note: current gadgets are managed entirely in the form of blocks):

什么是分类法?WordPress分类法解释插图3

Use the gadget to display your classification

Better classification using custom taxonomy

Although the default WordPress installation sets two different taxonomies for you, you are by no means limited to using categories and tags. By customizing the magic of taxonomies, you can create an unlimited number of your own taxonomies.

You can build a custom taxonomy, such as categories or tags. Remember-the main difference here is that categories are hierarchical (you can also have subcategories), while tags are not.

Your custom taxonomy can be used for almost anything. For example, if you have a WordPress site about books, you can create custom classifications for the following:

  • Author
  • Types

In this way, your readers can easily find content relevant to their favorite authors and types.

How to create your own custom classification in WordPress

Creating your own custom categories is actually easier than you think. As is usually the case with WordPress, you can do this:

  • With the help of the plug-in
  • Use your own code manually

In terms of plug-ins, you have many different options, some of which are the most popular:

  • Custom Post Type UI
  • Toolset Types
  • Pods

什么是分类法?WordPress分类法解释插图4

Create a custom classification using Custom Post Type UI

To take a manual route, you can use the register_taxonomy () function. For a complete discussion of how this feature works, you can read the detailed WordPress Codex.

In general, it is much easier for temporary webmasters to use one of the above plug-ins. All three plug-ins are popular, well supported, and easy to use.

After you add a custom classification through one of the above methods, you will treat it as a new box in the WordPress editor:

什么是分类法?WordPress分类法解释插图5

Customize the appearance of the classification at the backend

Articles about WordPress classification and tagging:

  • WordPress article classification add, edit and delete management
  • Creating WordPress Classification and subclassification Picture and text tutorial
  • Detailed description of WordPress catalogs and Tag tags
  • What is the WordPress tag and how to use it correctly

In addition, it is highly recommended to install the MagicPost-WordPress article management enhancement plug-in, the plug-in article moving function module, can help you quickly change the article classification and manage WordPress tags, is definitely an efficient WordPress plug-in.

Disclaimer: All articles on this website, unless otherwise specified or marked, are original and published on this website. Any individual or organization is prohibited from copying, stealing, collecting, or publishing the content of this site to any website, book, or other media platform without the consent of this site. If the content on this website infringes on the legitimate rights and interests of the original author, you can contact us for assistance.