Beginner's Guide for WordPress - Start your WordPress Blog in minutes.
Choosing the Best
WordPress Hosting
How to Easily
Install WordPress
Recommended
WordPress Plugins
View all Guides

How to Add Categories and Subcategories to WordPress

Last updated on by
Follow WPBeginner on YouTube
How to Add Categories and Subcategories to WordPress

WPBeginner is all about helping beginners get a hang of WordPress. We thought we did enough by just explaining the six step guide to setting up and starting a WordPress, but our users reminded us that we need to cover the usability of WordPress as well. Thank you users, we appreciate the nudge that help us get in the right direction and help you.

One of the most important features in WordPress is organizing the posts with categories. This help your user find the content easily. Sometimes there are needs to even go through and add subcategories. In this article we will show you step by step tutorial on how you can add categories and subcategories to WordPress.

This tutorial is being written for WordPress 2.8.4, so the images we are using are for that admin panel.

How to Add a Category

There are few ways of adding a post category to WordPress. The most used way to add categories is by going to category menu. You can see that by clicking on Posts » Categories

Add Main Categories in WordPress

You can leave the slug blank, unless you want a specific URL. For example, your category name is WordPress Plugins, so the slug by default would show, that is only if you are using the SEO Friendly URL structure, which we strongly recommend you do.

http://www.yoursite.com/category/wordpress-plugin/

But if you want to change the url, lets say you want the link to say wp-plugin, you can do so by adding the slug wp-plugin. Note you must not select a parent category because this is your top-level category.

Another quick way of adding category is adding it when you are writing a post. Often when you are writing an article, it might not fit some of your other categories, that is when this feature comes in handy. Note: Do not create category for every single post. Keep your category structure clean and only create categories if it is absolutely necessary.

Add Main Categories in WordPress

Note: This method is only for convenience. This does not allow you to pick a slug, or add a description. So make sure before you publish any post under that category, you edit the slug if it needs to be edited and add a description.

Now you have created categories, but sometimes that is not enough in organizing a site. Specially when you are thinking about creating a huge site or even a magazine. For example, if you have a general technology blog and you talk about all different sort of products. It is wise to create subcategories for popular topics. For example, if you are talking about Apple, which is a main category, you can add a subcategory for iPhone. This way your blog is even more organized.

Here is how you can add a Sub-Category in WordPress.

Add Sub-Categories in WordPress

Basically you are following all the steps from the main category except you now have the Parent category selected.

When you are using the SEO Friendly URL Structure and have the categories included in the URLs, then your post link would like this:

http://www.yoursite.com/maincategory/subcategory/your-post-title/

We strongly recommend you don’t go deeper than second level category because then it just gets messier.

If you want to convert a parent category into a subcategory later on as your blog grew this is what you should do. You need to go to your categories page by going to Posts » Categories and then you should bring your mouse to the category you want to edit. Then click the edit button.

Simply go to the page, and change the Parent from none to the category of your choice.

We hope this tutorial helped you add categories and subcategories for your blog. This is an essential part of your blog, so you must know how to do it right.


Editorial Staff at WPBeginner is a team of WordPress lovers led by Syed Balkhi. Page maintained by Syed Balkhi.

WPBeginner's Video Icon
Our HD-Quality tutorial videos for WordPress Beginners will teach you how to use WordPress to create and manage your own website in about an hour. Get started now »
  • http://www.wpbeginner.com/ WPBeginner Staff

    Yes, we do understand what you mean :)

    Many WordPress themes actually come with built-in support to display sub-menus under menus.

    Go to Appearance -> Menus and add a subcategory just below its parent category. drag the subcategory to your right it will appear a little idented under the parent category. Save your menu and preview your site.

    On the front end if your subcategory does not appear in a sub menu but instead appears slightly indented below the parent category, then it is likely that your theme does not handle the display of submenus like you want.

    There are plenty of WooCommerce themes which support submenus you can check out their demos until you find the one that displays product categories in menus like you want.

  • Derek

    Hi just wondering your advice for bulk uploading of categories via cvs file. I want have computer brands as categories but thinking there has to be a quicker way than doing individually?

  • mc

    Is it possible for a sub-category to apply to more than one parent? I.e. if the top level categories are Pizza and Calzones, ‘pepperoni’ can be a sub-category of both…but I don’t see how to handle that. Should ‘pepperoni’ be a tag instead?

    • http://www.wpbeginner.com/ WPBeginner Staff

      No it is not possible for a child category to have two parent categories. A workaround to this problem is to use custom taxonomies.

  • Anna

    I’m startineg a blog and have created a Category and Sub-Category but the sub-category is not indented or anything to make it obvious it’s a sub-category, just doesn’t look right. Any advice?

    • http://www.wpbeginner.com Editorial Staff

      This is a styling issue in your theme. You would have to customize that.

  • James

    But why? You say over and over again “to keep your blog organised” Where and to who are you organising it?

    Does it create category pages and if so do we really want them? can we control how they look ? Can we disable category pages?

    • http://www.wpbeginner.com Editorial Staff

      We are organizing all the content on your blog into categories.

      • Your Real Name

        Hi,. Can any one tell me how can i add sub-categories of a category in Navigation tab to display them once they click on specific category ? I am using Arras …
        In this tutorial, we’ll show you how to add sub-categories to your newly created top menu category. (In our case Help). 2. First, go to …
        How to Add Categories to a WordPress Blog Site. Categories for your WordPress blog are not as easily found as they might be. You could … Add sub-categories.

  • Trish

    This is very helpful! THANK YOU! OK, so if I have a Fitness blog and I want a category at the top to be “strength workouts” and then I want the user to be able to highlight “strength workouts” and see a list of the exact strength workouts I have to share/offer, is that called a subcategory? What if I want like 15 of these sample strength workouts… or eventually 100’s of them… ? Is this how I’d go about it? Thank you!!!

    • http://www.wpbeginner.com Editorial Staff

      Ok, so think of categories as sections in a book and sub-categories to be chapters. A proper example would be like this:

      Parent category is called Entertainment, and sub-categories would be Film, Gaming, Music, Television etc.

      In your case you would have strength workouts as category, and then have each individual strength workout as a post. From what it sounds like, you don’t need subcategories at all.

      • Trish

        OK, thanks. My blog will have recipes, workouts, a fashion section, etc. so I would like the reader to be able to go to one of those categories then pick a workout under the workout section, a recipe under “recipes — breakfast recipes — ” and so on… so if those are not called subcategories, than what are they? Like on peanutbutterfingers.com website – the website has categories such as “workouts” and then if you highlight over “workouts” you’ll see where you can pick a type of workout, go into that and then select a specific workout… how did she get it set up like that? Do I have those capabilities using wordpress? Thank you so much! Sorry, I’m kind of lost and new to this portion of it :)

  • Akgun_Fatih61

    Finally i did it :p realy thx man :D