In this beginners guide, you will learn how to add categories in WordPress, how to add subcategories, and how to display categories in WordPress. We will also include a reference for how to create custom category menus in WordPress.
When you are new to WordPress, it is important to understand what categories are and how to use them. This is an essential step to having a great website.
NOTE: TarttWeb is reader-supported. This means that we may earn a small commission at no additional cost when you make a purchase through referral links on our site.
If you’d like to jump to the section you’re looking for, a hyperlinked table of contents is available.
What are WordPress Categories?
By default, WordPress comes with two types of built-in taxonomy tools; categories and tags. These tools provide a way to structure and organize your website.
Note: If you don’t understand the difference between categories and tags, we recommend reading our guide on categories vs tags. This guide will teach you why categories and tags are different and how to use them.
Categories are used in WordPress to organize and structure your website. They allow you to sort and group related posts into logical sections that provide readers with a helpful way to find content.
WordPress categories can have subcategories to establish a hierarchy of terms. WordPress treats subcategories inside a category as a parent-child relationship.
For example, let us say that you have a blog where you write about books. One of your parent categories could be Fiction. Under Fiction, you might add some child subcategories such as Sci-Fi & Fantasy, Graphic Novels, and Mystery & Crime.
Additionally, having a good category structure can help visitors understand your website’s content and find topics that they are interested in more easily.
Finally, WordPress categories also play a part in your website’s search engine optimization (SEO). Creating categories with rich keywords will help search engines understand your website’s content and generate better organic traffic.
How to Add Categories in WordPress
In this section, you will learn how to add categories in WordPress from the Posts Category Screen and how to add categories in WordPress from within a post.
How to add Categories from the Posts Category Screen
This option is best for creating your website’s categories before you start publishing posts.
Step 1. Go to the Posts > Categories Screen
On the left side of the WordPress admin area, hover over Posts, then click on Categories. Alternatively, you can click on Posts, then click on Categories.
Doing so will open the categories administration page.
Step 2. Complete each Field
Complete each of the following fields.
- Name: Enter a unique name for your category.
- Slug: This is the URL of the category. You can leave this blank and let WordPress create one or enter your own. The slug should always be lowercase with dashes to separate words. In the example below, learn is the slug. Example: https://tarttweb.com/category/learn/
- Parent Category: This is covered in the how to add a child subcategory section of this guide. For now, you can leave it as it is.
- Description: Enter a meaningful description for your category or leave it blank.
Step 3. Click the Add New Category button
Once you have filled in each field, simply click the Add New Category button. Doing so will create and add the category to your site, making it available within posts and menus.
That’s it! You now know how to add categories in WordPress from the Posts Category Screen.
How to Add Categories in WordPress from within a Post
This option is for when you want to create a category while writing a post.
Step 1. Go to the Posts Admin Screen
On the left side of the WordPress admin area, click Posts.
Doing so will open the Posts administration page that contains all your drafts and published posts.
Now find the post that you want to add a category to and click the Edit link.
Step 2. Click the Categories Dropdown
On the right side of the post, look for the categories dropdown and click on it. Doing so will reveal the categories that you already have created, along with an option to create a new one.
Step 3. Click the Add New Category link
Click the Add New Category link. Doing so will reveal two options. Simply fill in the category name that you want to use. Leave the Parent Category option alone for now.
Once you have finished entering your category name, go ahead and click the Add New Category button. You will then see the new category added with it checked.
That’s it! You now know how to add a category in WordPress from within a post. Also, make sure you uncheck uncategorized before publishing your post.
How to Add a Child Subcategory in WordPress
In this section, you will learn how to add a child subcategory in WordPress from the Posts Category Screen and how to add a child subcategory from within a post.
Adding a Child Subcategory from the Posts Category Screen
Adding a child subcategory in WordPress from the Posts Category Screen is the same as adding a parent category with one difference.
While creating a category, select which category you want to be its parent from the Parent Category dropdown.
Once you have finished, click the Add New Category button. Doing so will add the new category as a child under the selected parent category.
In the example below, Fiction is the parent category with Sci-Fi & Fantasy as a child category. A child category will appear under its parent with a dash next to it.
Child categories can also have child subcategories of their own. In the example below, Sci-Fi & Fantasy is the parent of the Space child category.
Categories can only have one parent category. It is not possible to have a subcategory under multiple parent categories.
That’s it! You now know how to add a child subcategory in WordPress from the Posts Category Screen.
Adding a Child Subcategory from within a Post
Adding a child subcategory in WordPress from within a post is the same as adding a parent category with one difference.
While creating a category, select which category you want to be its parent from the Parent Category dropdown.
After clicking the Add New Category button, you will see the child subcategory added underneath its parent category.
That’s it! You now know how to add a child subcategory in WordPress from within a post.
How to Edit Categories in WordPress
In this section, you will learn how to edit categories in WordPress from the Posts Categories Screen.
First, you will need to go to the Posts > Categories Screen. On the left side of the admin area hover over Posts then click on Categories.
Alternatively, you can click on Posts, then click on Categories.
Next, find the category you want to edit and hover over it. Doing so will reveal four options, Edit, Quick Edit, Delete, and View. Click on Edit.
Clicking on Edit will load the Edit Category Screen. You will then be able to change the category Name, Slug, Parent Category, and Description.
Finally, when you have finished making your changes, click on the Update button, and you’re done.
That’s it! You now know how to edit a category in WordPress.
How to Display Categories in WordPress Sidebar
In this section, you will learn how to display a list of categories in the sidebar and footer of your WordPress website using widgets.
Displaying categories on your WordPress website can be done in a few different ways. You can display them in your sidebar, footer, and navigation menu.
To learn how to add categories to your navigation menu, we recommend reading, How to Create a Menu in WordPress.
There are two ways to add widgets to your sidebar and footer. One is by going directly to the Appearance Widgets screen. The other is to add them from the Customization Screen.
By default, the Categories Widget will show all your categories in a list arranged in alphabetical order. To be displayed in the list, categories must have at least one post assigned to them.
Note: Whether you are adding widgets to your sidebar or footer, they are both done in the exact same way.
How to Add Category Widget using the Appearance Widgets Screen
Your widget areas may look different depending on the WordPress theme you are using. WordPress themes dictate what widget areas are available.
In the WordPress admin area, hover over Appearance, then click on Widgets.
Doing so will load the Appearance Widgets Screen, where you can manage your active widgets.
At the top of the screen, next to Widgets, click the Add block icon (the plus sign). This will show you all available widgets.
To locate the Categories widget, you can either type Categories in the search box or scroll down until you find it.
To add the Categories widget, click on the widget, then use the arrows on the toolbar to move it to the desired location.
Note: Clicking on a widget in the widget area will show its settings on the right side. If you don’t see these settings, make sure the gear icon is clicked, located next to the Update button.
You can display the widget as a dropdown by clicking the Display as dropdown toggle, located on the right side in the Categories settings.
You can also show child subcategories by clicking the Show hierarchy toggle and a post count for each category by clicking the Show post counts toggle.
Once you have finished with your settings, click the Update button and look at the front of your website.
That’s it! You now know how to add the Categories widget to your sidebar using the Appearance Widgets screen.
How to Add Category Widget using the Customization Screen
In this section, you will need to be on the front of your WordPress website.
The customization screen may look different depending on the WordPress theme you are using, including what widget areas are available. Also, some widget areas may not be accessible until you are on the correct page, like a post page.
On the toolbar at the top, click on Customize. Doing so will load the customization screen.
Now locate and click on Widgets.
After clicking on Widgets, you will see your available widget areas. Click the widget area where you want to add the Categories widget.
Now click the Add block icon (the plus sign).
As we did in the previous exercise, search or scroll until you locate the Categories widget.
Then use the arrows on the toolbar to place the widget in the desired location. It is also possible to drag and drop it into position.
To change the settings of the Categories widget, click the vertical dots, then click Show more settings.
This will show you the settings for the widget.
Once you have finished, click the Publish button at the top.
Alternatively, widgets can be dragged and dropped into position. It is also possible to hover your mouse over the area you want to insert a widget and click the plus sign.
That’s it! You now know how to add the Categories widget to your sidebar or any other widget area.
Aside from the default Category widget, it is also possible to create a custom category menu using the WordPress Navigation Menu. You can then add that to your website header, footer, or use the Navigation Menu widget to add it to your sidebar or other widget areas.
We hope this guide has helped you learn how to add categories and subcategories in WordPress, including how to display categories on your website with the WordPress Categories widget.
If, you found this article helpful, let us know in the comments section, follow us on social media, or subscribe to our newsletter for more. If you need a guide or article written, contact us and select article request in the dropdown.