For those who have recently started with WordPress development, be it a simple plugin or theme, you must feel that you are ready to move to the next level. This can include things like boxes custom metadata, configuration API, custom post types, or using custom taxonomies. All these are valuable to learn and useful for full functionality offered things WordPress.
Visist here for WordPress Website Development in Adelaide, Australia: https://platinumwebmedia.com.au/wordpress/
In this article, we will show the main advantages of using taxonomies, from the concept of how working in WordPress and how we can use in templates and plugins to implement them in our own development.
If you’re starting at a beginner level in the developed WordPress , then this article may be suitable for growing experience in this type of development.
What are the taxonomies in WordPress?
To start with the broadest possible taxonomies idea, let’s take a look at the definition. According to Wikipedia:
“Taxonomy is the practice and science of classification.”
Sounds simple, right? In short, it is a way of classifying things, but if that’s the case, then why the issue causing us problems when working with WordPress?
According to the WordPress Codex
Taxonomy is one of those words that most people never hear or use. Basically, taxonomy is a way to group things.
And this definition is not really all that much different from what Wikipedia shows, right? The common denominator between the two definitions is that it is a way to group things. That’s all. That is the basic definition of taxonomy and that is what we need to understand in order to build a practical understanding of how they work inside of WordPress.
Where taxonomies used in WordPress?
Taxonomies are used throughout WordPress, but are followed over the following:
Each base installation provides by default these particular characteristics for the type of standard input, and many of us use every day, either by working with our own blog, managing the blog of another person, or perhaps building a site for someone using WordPress.
If you’re new to WordPress, then you should know:
- A category allows grouping post or entries within a common category.
- A label allows us to classify our content similarly, but in a way somewhat less structured. For example, under Videos, you can tag the videos using tags that are associated with the frame rate of the video. This does not make sense as a category because the pictures do not have frame rates.
You can think of categories to be more structured and tags as freer to group form, but still raises questions as to how they fit into WordPress and how actually you can go about creating some kind of conceptual model for taxonomies.
How taxonomies are classified in WordPress?
It is useful to think of taxonomies in two forms: hierarchical and non-hierarchical.
The most common example of hierarchical taxonomy is a category. A hierarchical taxonomy is one that can be a single taxonomy on their own, or can be grouped into lots elements. The hierarchical taxonomy base which includes WordPress, called Uncategorized. But let’s say you’re building a media site with photos and videos. From here, you can have two categories: Photos and Videos.
Then, in photographs may have outdoors, lifestyle, Families, Children and / or weddings. For videos, you may need HD, people, wildlife, film, and so on.
If you are going to see this in the WordPress dashboard, it may look something like this:
- High Definition
Of course, you could have each child categories that you find with your own children. For example, HD video could have 720p and 1080p. As you can see, hierarchical taxonomies work best when there is a clear way to organize information as desired.
But what about non-hierarchical taxonomies the most common example of which is a label, a non-hierarchical taxonomy are that which exists on its own, no notion of clusters and these can be added easily and freely articles.
Based on our previous example, say your photos and your videos are divided into Black and White or Color. Although they may work as categories, also working as labels that can be applied to both photos and videos.
Say we have our filing cabinet, a cabinet to cabinet Photography and Videos. Then within each of these cabinets are drawers. For the former, we have drawers for outdoor, lifestyle, family, etc., and the latter have high definition, people, wildlife, and so on.
So let’s say that each element of the drawers is identified as Color or Black. You may also want to seal each photo with a season, a year, a place, and so on. Anyway, each element may have a label, stamp, or a tab to indicate the type of film used to shoot the subject. The combinations that can be used to retrieve this information somewhat more complex;
What can you follow?
As mentioned at the beginning of the entry, this is just an introduction. Now, we are ready to turn our attention to a more technically advanced approach to working with taxonomies. That is, we are ready to see taxonomies in the context of templates and plugins, and know when it is appropriate to use which, where and why and how the compatibility factors in conversation.