Learning outcomes

  1. Define taxonomy and describe how WordPress implements them.
  2. Create categories and tags.
  3. Apply categories and tags to posts.
  4. Manage descriptions and slugs for categories and tags.
  5. Utilize widgets for category and tag lists.

Comprehension questions

  • What are categories?
  • What is the best option for associating multiple keywords with posts?
  • What is a slug for a category or tag?
  • Can categories be converted to tags?

Transcript

0:04
Hello everybody, my name is Hari Shanker and I am a deputy with the WordPress community team. In this workshop, we will learn about taxonomies in WordPress. WordPress has built in taxonomies for managing content. What is the taxonomy? A taxonomies a mechanism for grouping items by the characteristics through the use of terms. By default, posts in WordPress are arranged in a chronological order, reflecting the timely nature. posts can also be organized using categories and tags as a means of taxonomy. Now, pages in WordPress, they cannot use categories and tags. Instead, they are organized in Parent Child hierarchies. What are categories? Let’s look into categories first, categories offer a way to sort and group posts into different sections. They tend to be predefined and broad ranging. What is the category let’s dig deeper and learn what a category actually is. So a category is a descriptive word, or a phrase that has uses text label for a group of posts. So if there are a set of posts, which you want to group into a particular category, you can assign a category to it. Now, categories may have sub categories as well, which allows for creating a hierarchy of category items. WordPress considers posts in sub categories to also be members of the parent category. So subcategories are more specific terms within a parent category. Now, a post can have more than one category applied to it. But it’s always best to restrict post to a single category. multiple categories with single posts tends to clutter the organization of content and may confuse readers. Now tags, they are another form of hierarchy or another form of taxonomy that we’ll be discussing today. Tags are a better means of providing additional groupings and relationships between posts. Tags are actually similar to categories, but they are using a more free form manner for applying all kinds of keywords to posts. posts tend to have multiple tags for cross referencing, so they can be used in an ad hoc way without causing conversions. Now, unlike categories, tags do not have any hierarchy. So the social media equivalent of tag is a hashtag. So you can use tags to post the same way you would use hashtags on a social media post, like in Twitter or Instagram. So with that out of the way, let’s dig deeper and see categories and tags in action on a WordPress site.

Alright, folks, so let’s dig deep into categories in WordPress. So in order to see categories in WordPress, we can first take a look at one of the individual blog posts where categories are actually seen categories can actually be added or modified to posts. Let’s take a quick look at that. So I’m going to the post section in my our dress dashboard. As you can see, I’m on my WordPress dashboard. There’s my dev site, I’m on over to his dashboard. So I’ve gone to posts all posts, and I’m choosing this post called hello world. So the Hello World post has opened. As you can see, on the right hand section, there is a section called categories. So I’m going to open that, I can see that this section is set to uncategorized. So uncategorized is the default WordPress category. So when you create a new post, it gets the uncategorized category. Now, if you want, you can assign categories to it. So you can see a few options here, articles general photography test category, these are the ones I created, I can actually add a new category and assign that to this post. If I want, I can also assign multiple categories. Let’s quickly see how that works. Now, I’m going to actually change the category of this post something. So for instance, if I want to set a category of articles, all I need to do is to select this option. And I’ve gone ahead and click the Update button. As you can see, the page is updated. Now, the this post, this post has been assigned the articles category. Now if I want to remove the categories category, I just need to uncheck this uncategorized checkbox and click on the Update button. Yep, that is done that is remove the uncategorized category from this post, I can actually add a new category also if I want. So for that, I just need to click on this Add New Category button. And I can add a new category name that would be new, I’m gonna add a category called New and I’m going to click on the Add category button. Yes, the new category has been added and it has already been assigned as well. So that’s how categories work. Let’s see how it looks in the in the WordPress dashboard in the backend. So I’m going to I’m going to assign general as well. Now, another thing to note here is that you can assign multiple categories to an individual post. So one post can have more than one categories if you want but it’s always good to limit the number of categories to a few ones. Not It’s good to not have more than, I don’t know two or three categories to individual posts because the more categories a post as it could be more confusing for users. So the lesser categories, the better. Many people recommend that it’s good to have at have not more than one or two categories compostable. But there’s a way to fix that I’m, as I mentioned earlier, you can use tags, we get it activated. Let’s explore categories more. Now I’ve assigned three categories is post, and I’m taking my own advice, I’m going to remove multiple categories. So I’m just assigning articles in general, and I’m going to update this post. Now I’m going to go back to the WordPress dashboard. As you can see, this is a list of all the posts in my WordPress dashboard. This is the Hello World post that we just edited. On the middle, you can see this section called categories where it lists the categories this post. So if you remember where it said the categories of articles in general, those categories are now being assigned to this post. Similarly, you can see the list of other posts in the site. So there’s a post that is scheduled. Now that post is the desk category, there’s another post that’s that’s in draft that has a photographic category. So all these categories are pre assigned. Now in the all posts section, you can see a list of posts and under the under the underneath the category section, you can see which category it belongs to. Now, there may be situations where you’d like to see just the posts that belong to a particular category. WordPress allows for you a way to do this.

So in order to do that, just go to this all categories section, let’s say you just want to view all the posts in the article section. So just go here, select the articles option and click on the filter option. Yep, now you can see just the posts in the article section. Similarly, you can, we can check out all the posts in the fotografie section, the studio photograpy of photography option and click on the filter button that will show you all the posts that belong to the photography section. Now, you can actually edit multiple posts and assign categories. So let’s say I want to assign the the new category that I added to these three posts. So now if I want to do that, I’m just going to select three posts that I like to assign the category to I’ve selected that and I’m going to go to bulk actions, I’m going to click on the Edit button, left click on the Apply button. So you can see the list of categories here. I’ve gone here I’ve chosen the new option that I have, I’m going to click the Update option. Now as you can see, these three blog posts, they now have a new gallery. Now please note, these posts had other categories. So the video post, I’ve had a photographic category previously, the new category was added to it. So that’s what this does. Now, let’s say I did not want the video post I post to have the photographic identity I just like I just want to have I just want that post to have the new gallery. How do I change it? Normally, you’d think that you’d need to go to this post directly, you can open this post directly, and you need to go to the sidebar auto changes. But that’s not the only way to do it. That’s that’s the hard way. That’s the easy way. This is where Quick Edit comes into the picture. So if you want to quick edit the post, just hover your mouse on that particular post, then you will see some options. So you will see this option called cricket. When you click on the Quick Edit button, you can easily add or modify categories. So I’m going to remove the photographic category by unchecking. It I’m going to click on the Update button. And yes, that has upgraded the change. So similarly, you can add modify assign categories, in this section itself. Next, we’ll take a quick look at the category section. So if you look at the posts section, you will see posts all posts add new categories. Now in this section, we can add categories in bulk for for all of WordPress. So we saw that in the post screen, we have the option to add categories. So this is the post screen, you could add categories in this section. But that’s not the only way to do it. If you go to posts categories, you can also add categories. So you don’t need to individually go to a post in order to do that you can do this within the backend of WordPress itself. So hypothetically, I’m going to add a category in WordPress.

So hypothetically, I’m going to add a category in WordPress, I’m going to choose the option random you can give a slug to it. So like every WordPress post, even category has also has a slug. So slug is what defined set when you when you open a URL. So I’m going to add a slug of random. Here’s where I can assign a parent category. So before to get to that I need to explain what parent category and the child categories I’ll get to that in a bit. So I’m going to click on the Add. So here you also have the option to enter a short description of the category so I can I can actually do that here as well. This sir random category. I’ve clicked the Add New Category button. Yes, it is added. Now let me quickly explain the parent categories and the child categories. So I mentioned earlier in the introduction that categories have these two types. So a parent category contains a larger classification and he classification could have sub classifications. So for instance, let’s take the example of animals. So animals is a large category. And underneath animals, you have the line, you have a cat. And underneath cats, there are different types of cats. There are different breeds of cats, so you can add different breeds. Similarly, if you look at animals, dogs, dogs, is a subcategory of the category animals. And if underneath dogs are the different breeds of dogs. So that’s how categories and subcategories work in WordPress, you can add parent categories, you can add categories underneath the parent category, so and you can nest them any way you want. So this is really helpful in content management. Let’s take a quick example to see how this works. So I’m going to add a subcategory to the articles or category. So I’m going to add the option blog posts. I’ll add a slug to it. This is a subcategory of articles.

Now what I’m going to do is I’m going to choose the parent category option from this, and I’m going to select articles. Now, as you can see, blog posts come underneath articles. Now, I’m going to add another sub category underneath article called news stories. Or add a slug called news. subcategory of articles, as you can see articles is populated automatically as the parent category. Now I can even add, I can even add more nesting. So blog child, this is a this is a temporary name, don’t be confused about the names. This is a name that I’ve given as an example. So I’ve added the slug block child, I have added a description to it as well. Now rather than that, now this got assigned as the child of the articles category, that’s that’s a mistake from my end, I’m going to correct it. Now remember the quick edit that I spoke of in both section that can be done here as well. So I’m going to click on the clip, Quick Edit option. Unfortunately, it only allows you to allows me to change in that so I need to actually go there to change it. So I’ve opened the blog categories blog child section, I’m going to choose blog post sets the band category, I will come up, click on the Update button. Let’s see what happens. Yes, it shows category of data, you will see these two dots, two dashes. And since the blog tile is directly underneath blog posts, it’s been said, blog child is a child of blog posts, and blog posts is the title of articles. And news stories, blog child and blog posts are chill enough articles. We’ve seen what categories are. Next, let’s take a look at tags in WordPress. So what are tags, just like categories, they are a way to sort posts. The only difference between categories and tags is that categories have hierarchies. So which means that you can add, you can add parent categories, you can add child categories, but tags, they do not have any form of hierarchy. So they are independent. Also, it is recommended that a post has more than one tax, it’ll really help with discovery. So let’s quickly take a look at the new post and see what tags are. So I’m going to go to the post section of my site. And I’m going to open this test post. Alright, so this is a test post that I’ve read in the site. And I’m going to the left right sidebar, just underneath categories, you can see this option called tags. So by clicking on this tag to this, I can see that there’s no tags assigned to this post at this time. So I’m going to add a new one, I’m going to add a tag called random. I’m going to add a tag called New, we’re going to add a tag called test. So I’ve added these tags, and these tags could get the same. Now please note, in many cases, while typing, there’s chance that you could miss type something and that might actually cause issues. Also, a general recommendation is that you do not add several tags. So like, let’s say I’m writing a post on a particular topic, it would be ideal to have about seven to eight tags or maybe 10 tags. But if you had several of these types, like many people on social media posts, it could be tricky. On that note tags are similar to what we see with social media posts. So we’ve seen hashtags and Twitter, we’ve seen hashtags, Instagram, and Facebook and all of the social media pages. So tags are similar. So it’s a way to help improve discoverability of your of your post. And it can also have the search engine optimization. And similar to categories. When you if there’s an existing tag when you type it over here, it should display. So I’m going to I’m going to quickly test this out. So the site industry did not have any other tags previously. So I’ve added a few tags now. I’m going to update it. And then I’m going to go back, I’m going to open this new post which is called the link post type. I’m going to go back to tags, I’m going to type new c so you can see that the suggestion of new coming up which means that it shows up the existing type called New which we had earlier. Similarly, if there’s an existing tag by typing it over here, you should be able to find them. So I’ve clicked on the Update button and the tag has been assigned to the post. Yep, as you can see, the tags have now been assigned. So new random and tests are showing up as well as the link post type, it also has the tag similarly. So like categories, the tags will also show up in this section. And that’s a great way to. So if you want to see the posts that belong to a particular tag, you can just click on this button, and it will show up all the posts that belong to the specs, it’s a neat way to really find the posts that belong to a particular tag.

So similar to categories, we can also. So we saw that there’s a category subsection in in the WP admin. So similarly, we can also find a list of tags directly which we can edit, modify, or even add. So I’m going to test this out, I’m going to go to the tags section. So these are the tags that we added earlier, I can add new tags here. So the process is very similar to adding categories, which we saw earlier in this workshop. So I’m going to add a new tag, I’m swimming with a new tag. And I’m going to give it a slug. So as I mentioned earlier, the slug should be in small letters. And it’s it’s essentially the identity of this of the stack. And I can even add a description here, if I want to, I’m going to add a random description. And as you can see, the tag has been added. So if you look at the section, you can see that there’s a number alongside the site website, which is a section count. So it shows the number of posts that lump each tag. So I’ve just created a new tag button, new tag tag, which does not have any posts. That’s why the count is showing up zero. But all the other tags, they have at least one post, which is so this new. This new tag, it has two posts, as you can see, if you remember, I had assigned this new tag to another post, that is why it has the count too. And I can actually sort the list. So this this is applicable to categories as well, I can actually sort this list based on several aspects like I can, I can sort this in the beginning, but he could add it. So it really helps with discoverability. And similar to post, This section also has bulk action. So I again, again, bulk delete tags as well if I want to. Now, the same thing applies to categories as well I can I can, I can sort these things. I have bulk options. Like if I want to delete all my categories, I can I can select or I can just click on this button which selects all categories. Or I can make a selection of just a few get categories and have the modified. So all that all that is possible here. So those are categories and tags. Next, let’s take a look at the widgets. So if you go to appearance and widgets, you can see that there are several widgets over here. Now, one, one area where categories and tags can be helpful are with the help of widgets. So how does this really work? Let’s say you have a site and you want to display the prominent categories of your site, on the right hand side are mainly on a menu. So this is where this becomes really helpful. Let’s take a look at some of the category integrators. So as you can see my site, it runs on the 2020 theme, even though it’s titled 2016 Yeah, transforms training 2018. And if you scroll down, yeah, there’s a list of categories over here that that have started with the categories widget. As you can see, now it has several options, I can add a title, if I want to, I can display this as a drop down. So when I do that, and when I refresh the page, you can see that there’s a drop down instead, instead of a list. And now I can even make changes to it. I can show post counts. So when I, when I click on the show post count button, it shows the count of four. So it says articles four means that there are four posts in the category, article. So General has one, which means that there’s just one post in the general category. Now, I can also show the hierarchy, which means that if there’s a parent post, if there’s a parent category and a child category, it will show it in that way. So I’m going to show I’ve chosen the option show hierarchy as well. And I’m going to save the changes. Let’s take a look here to see how it how to look like so. Yeah, so these are the options that it shows. So I’m not really saved any of these. I don’t have any direct hierarchy settings. So it doesn’t really show here. But if I had hierarchy set, it will show you. So that is the categories widget. Next, Next, let’s take a look at the tax widget. So there’s a widget called tag cloud.

The tag cloud widget, what it does is it shows a cloud of widgets, like what is it? What does it look like? It’s a very fancy representation. It’s a it’s like. So if let’s say if as if a bag has multiple posts shows up in a big format if the photographer only wanted to pose it shows up small with the pictorial representation. It’s very interesting representation of how how many How popular a particular tag is. So I’ll give you an example. Let’s say you have a blog, where you write a lot about WordPress. And you have added a tag called WordPress. And you’ve assigned this tag called WordPress on all the posts, almost all the posts are made several of the posts in your site. So then the word WordPress would look very large. But let’s say you just have one post with with one or two posts with the other with the tackle images. So the tag images would look small, let’s let’s take a look to see how it looks like in the front end. So I’m going to see if tagcloud, I’ve had the name rather. And again, here also you can set the option showed that counts, which could be which essentially shows the count of the number of posts belong to each track. So as you can see, if you remember, the new tag has as big because it has two posts, random and test have just one postage. So if you remember, I had assigned to post it, that’s why the new text is going like similarly. So there are several tags that would look in that fashion. So let’s add a new tag called a new tag. So the tag new tag to has, let’s say 10 posts, it would look enormous. And the new tag, which is kind of big right now it’s going to go a little smaller, and vandeman tests are probably going to remain just as small. So that’s how it works. It’s very pictorial representation. So the biggest text, you see that that’s the tag with the most number of posts in the site. I hope you got the point. So that’s how we stack language as well. Finally, I’d like to, I’d like you to take a look at the additional URL specific tool that we have in WordPress. So it’s called a categories and tags converter. So if you if you’d like to convert to convert categories and tags between each other, you can use the CATA convert categories and backs converter plugin which is available with tools available tools. You can also download it from our resort org in plugin section, you can use it to convert categories and tags along with each other in other areas or categories and tags can be used is to add these to the site menu. So this is my menu, I can access it via either appearance menus, or by going to appearance, customize and menus. So let’s say I have a menu, which just has some some details like home about and contact, let’s say I want to add a menu with the list of data. So this is a, this is a very, very useful way. So this is a very useful way to use categories in WordPress, I’m going to do just that. I’m going to go here, and I’m going to choose a list of categories. Now, let’s say I just want to add the list, add the category articles over here. So I just click here, and it shows up, I want to add the category fotografie, it shows up, I want the other category general it shows up so I can arrange it in any way that I want. So the benefit of this approach is that whenever a person visits the site, they can see these things prominently on the top of your site. And it really helps people to find out posts belong to a particular category. And it’s very helpful. So you can use get tags in the same way. So and So similarly, like here, you can see a list of tags, I’m just gonna click on the New button, and it really shows up the new tag over here. So that’s also a great way that you can use me, you can essentially use tags in WordPress, all I need to do is to publish the post and all of the categories and tags that I’ve added shows up Yeah, so I can. So just the way the customizer works, you can remove or add tags the way you want. So you can directly do it over here. And it’s a neat way to represent the taxonomies in your site. With that we’ve come to the end of the category versus tax workshop, I hope I was able to explain the difference between categories and tags to you properly. And I hope you were able to understand what it is, feel free to play around with it and use it feel free to add categories and tags. So it’s gonna really help you with search engine optimization and discoverability of the content that you write music to is especially helpful if you run something like a blog. Or if you have several blog posts or news articles on your site. It’s really helpful to subdivide each articles on based on sections. And it really helps your users to identify these things. And it’s really helpful if you can add these tags to your site’s tags or categories to your site’s menus. And it also really helps with SEO because of these stacks they get sure they show up in search engines. And it’s really helpful for you to find out what’s going on or for your users to come to your site to find your site. All right, folks. So let’s wrap up for today. I’ll see you online or the next Learn WordPress workshop. Until then, bye for now.

Was this answer helpful? 0 Users Found This Useful (0 Votes)