Categories are a crucial part of the way WordPress organizes posts, pages, and many other things. In this tutorial you’ll learn how to add and edit your own categories.
Add and Edit WordPress Categories
What Are Categories in WordPress?
Categories are one of the two predefined taxonomies in WordPress (the other being tags). They’re a way of grouping related content; think of them as being like labels.
For example, you might have several posts which are all about news, then you may have others which are all tutorials. “News” and “Tutorials” would be two categories you could use to identify these groups.
Take a look at The Verge. It uses a host of categories to group related content, then a series of subcategories to further organize things. Within the category Science, you see subcategories like Health and Environment, allowing users to quickly focus in on the content they want.
Note: The Verge isn’t built with WordPress, but the principle of categories is universal.
How to Add a New Category in WordPress
If you open up the Posts list in the WordPress admin you’ll see that one of the columns used is Categories:
By default there is one category present in WordPress (there must always be one) which in this case is “Uncategorized”. So this first post called “Hello world!” belongs to the Uncategorized category. This sounds a little strange, but it at least encourages you to add some proper categories!
Click on “Hello world!” and you’ll be taken to the post editor. In the sidebar you’ll see the categories, with the applied ones checked:
Add a new one by clicking on Add New Category and filling in the details you want.
We mentioned The Verge earlier and showed its categories and subcategories. This hierarchy is achieved in WordPress by using Parent Categories. When we add a category we can choose to give it a parent category. For example we can make new “Tutorial” and “Code” categories, but make “Tutorial” a parent of “Code”.
Here you can see the effect of creating categories and subcategories. Our post now belongs to both, so on our website it would appear on the “Tutorial” archive and the “Code” archive.
How to Edit a Category in WordPress
If you want to edit the categories we’ve just created go to Posts > Categories and you’ll see a list of all the categories (from this page you can also add a new one, even including a description for more detail).
Edit a category by clicking on it, then changing the information on the edit screen:
Here you can change its:
- parent category
How to Delete a Category in WordPress
From the category list, you can delete each one by hovering over them and clicking the Delete link which appears. Alternatively you can select multiple categories using the checkboxes and apply a bulk action, like so:
If you delete a category which is the parent of another, those child categories will be moved up a level.
That’s how you can add, edit, and delete categories in WordPress!
Remember that WordPress has other similar taxonomies, such as tags, and themes often use their own custom taxonomies too. The process of adding, editing, and deleting those is more or less the same as we’ve just described.
Learn More WordPress Basics
We have a wide range of tutorials which explain the basics of using WordPress, why not take a look at these to get started!