How to Add Categories and Subcategories in WordPress

The website structure is important to keep all the resources organized so the user doesn’t have difficulty navigating your website. For this purpose, many content management systems (CMS), such as wordpress, use categories and subcategories to keep the post and data organized.

In this article, I will explain how the categories and subcategories work in wordpress and how to add categories and subcategories in wordpress.

What Is Category And Sub Category In WordPress?

Categories are features of wordpress that let you organize your articles and improve the overall structure of your website.

A subcategory is when we add a nested category in the parent category. For example, the parent category is News, and the subcategories will be International, Local, etc.

You can also make a separate page to show the post related to any specific category, and that page will only show the archive of that particular Category.

The category helps organize your website content, improves the overall User experience (UX) of your website, and improves your website’s search engine optimization (SEO). It is easy for the crawlers to know the context of site structure from the categories.

You may Like:

How to Find WordPress Category ID

How to Find WordPress Page Id or Post Id

Add Categories in WordPress

As we learn, what are categories and subcategories? Now for adding categories in your wordpress, there are two methods one using the block editor menu in wordpress, and the second is by going to the categories page in your wordpress dashboard.

Method 1) Add Categories Form Block Editor Menu (In 3 Steps)

Using the block editor method for creating the Category is simple and straight as you can make the Category during the post-writing from the side menu of the block editor menu. Below are steps for creating the categories from the block editor menu

Step 1: Select categories option from the menu of Block Editor

Add Categories Form Block Editor Menu

First, you will open the post you want the Category to be added to get started. Once opened, click on the gear icon in the top right corner. It will open the block editor menu, expand the categories section, and see all your categories.

If you didn’t have any categories, you would see the wordpress default category named “Uncategorized.”

Read Also: Remove Uncategorized category in wordpress

Step 2: Click on Add New Category Link in Category Section

add category to post in wordpress

Click on the Add New Category link. It will display a new field which you will fill in the next step.

Step 3: Fill in the New category Field and Save it

Once we click on add new Category, the field we will have is New Category Name and Parent category.

fill category name

Fill in the name of the Category but make sure it’s different from the other categories. You just created your Category. We are not selecting any option from the parent category dropdown as we are not creating a subcategory.

For example, we are starting a website focusing on laptops. The main category will be a “laptop,” which can be later broken down into additional subcategories.

As you have created your category, you can use this Category in your future posts without creating it again and again.

Method 2) Add Categories from WordPress Dashboard

Add Categories from WordPress Dashboard

In this method of adding the categories, we will go to the Posts > Categories in wordpress. Then you can add the new Category before publishing any content.

So if you are planning to structure your new or existing site and want to add categories before the content is even added to that, you can use this method.

Also, you can add descriptions and slugs to your Category, and the advantage of this method is that you can modify your existing categories.

How to Add Subcategories in WordPress

Adding subcategories in wordpress can also be done using two methods, same as adding the Category, but the steps involved in adding the subcategories are slightly changed.

You can use which method is easy to add the subcategory to your wordpress website.

Method 1) Add Subcategories Form Block Editor Menu (In 3 Steps)

Adding the subcategories using this method is quick and straightforward, as you can add it from the block editor menu while editing or writing your post. Follow the steps below for creating the subcategories from the block editor in wordpress.

Step 1: Select Categories Option in the Block Editor Menu

Open the post you want to add a new subcategory click on the gear icon at the top right corner. It will display the block editor menu.

Expand the categories option, and you will see all the categories you have created.

 Step 2: Click on Add New Category Link

Now click on the Add New Category link, and it will display a field where you can add the name of the subcategory and make sure it’s unique.

Step 3: Select the Parent Category and Save It

Select the Parent Category and Save It

Once you give a name to your subcategory, you can now select its parent category, but make sure you have created the parent category before adding the subcategory to its parent.

For example, we have created a category before named “Laptop” to make it our parent category and add the subcategory “Gaming” to It.

Method 2) Add Subcategories From WordPress Dashboard

Adding subcategories from your wordpress dashboard is a simple and quick process and gives many options compared to adding subcategories from the block editor screen.

Add Subcategories From WordPress Dashboard

Open your wordpress dashboard and go to Posts > Categories.  Here you will see all the categories you have created so far. For adding subcategories, fill the category name in the category name field and form the parent dropdown to select the category parent.

Once done, you will see the subcategory below the parent category slightly to the left. This method is helpful as you can see all your categories and subcategories overview. You can also modify and delete your previous categories.

Add Categories and Subcategories in WordPress

Display Categories and Child Categories in the WordPress Sidebar

Display Categories and Child Categories in WordPress Sidebar

If you want to display the categories and child category in the wordpress sidebar, go to Appearance > Widgets

categories sidebar widget

Click on the Right Sidebar dropdown and then click on the plus icon. It will open a wordpress search Now type categories in it, and it will add the categories to your wordpress sidebar.

Note:  The Category will only display on the sidebar when one post is added. If you have an empty category, then it will not be displayed on the sidebar.

If you want to include the subcategory in the sidebar, then you have to enable the
Show the hierarchy toggle from the settings of the category widget.

SEO Benefits of Categories and Subcategories

As we have discussed earlier, categories improve the overall user experience as it’s easy for visitors to navigate your website content with the help of categories, which will improve your bounce rate and user engagement rate on your website.

As Google is tracking these user metrics, a good user experience will signal that the website has a good engagement rate and improve your overall website performance on SERP.

When you are using categories, your URL will look like this:

This is clearer for users and search engines to understand what the post is about, and you have a good chance to rank if you follow other SEO practices and Guidelines.

remove category prefix in wordpress

If you want to change the /category/ prefix, you can go to the Settings > Permalinks page. Here you will find a category base option put your desired name and click on Save changes

Additionally, if you want to get rid of the category prefix as it is not contributing to any SEO benefit then check out our guide for removing category from wordpress URL or install the Remove Category URL plugin, once installed, it will remove the Category prefix from your URL so it will look like this:

Note: If you change the category Base on an existing wordpress website, then use redirects to avoid 404 errors for users and search engines.

FAQs (Add Categories and Subcategories in WordPress)

Below are some most common FAQs related to Adding Categories and Subcategories in WordPress.

How do I add categories and subcategories in wordpress?

To add categories and subcategories in WordPress, follow these steps:

  1. Access Block Editor: Open your post in the block editor.
  2. Create New Category: Click the gear icon, go to Categories, and select “Add New Category.”
  3. Name Category: Enter a unique name, and save.
  4. Adding Subcategories: Repeat steps 1 and 2.
  5. Set Parent Category: Name the subcategory, and choose its parent category.

How to Add Product Categories in WooCommerce?

Adding a category in WooCommerce is Easy! Just follow these steps:

  1. Go to Dashboard > Products > Categories.
  2. On the left, fill in fields like Name, Slug (for the URL), Parent (if applicable), Description, Display Type, and Thumbnail.
  3. Once all information is entered, click “Add New Product Category.

How to Add Subcategories in WooCommerce?

To Add subcategories in WooCommerce follow these steps:

  1. Access Your Dashboard: Go to Dashboard > Products > Categories.
  2. Edit Category: Choose the category you want to edit, and click to open the Edit Product Category page.
  3. Set Parent Category: In the Parent category drop-down, select the parent category for your subcategory.
  4. Save Changes: Click “Update” to save your changes.


In simple words, adding categories and subcategories in WordPress is like the folders on your computer. It helps make your website organized and easier for people to find what content they are looking for on your website. Also, a good structure of the website improves website SEO which means your website will have a better position on Google search result pages.

However, it’s important to be careful. If you make too many categories and subcategories, things can get messy. So, before you start making stuff for your website, plan out how you want things organized. Create your categories and subcategories first, like making a blueprint for your website. This way, your website will be well-organized and user-friendly from the start.

Still have any issues adding categories and subcategories you can ask me via comment and I will be happy to assist you.

Bilal, a versatile Full Stack Developer and SEO expert, co-founded WebTalkHub. When he's not optimizing websites, you'll find him embracing a fitness routine, diving into books, and exploring new horizons through travel.

Leave a Comment