Search
Close this search box.

How to Add WordPress Categories and Subcategories

Learn how to organise your posts properly with this quick tutorial. It shows you how to add WordPress categories and sub-categories and why they’re so useful. Every WP installation comes with an effective way to group all posts based on specific relationships. Using categories and sub-categories also makes your content easier to find and manage from the Dashboard.

More importantly, is the way that categories help site visitors find the content they’re looking for quickly. WordPress categories, sub-categories, tags, and taxonomies can also help search engine optimisation (SEO). The secret is to know how to optimise for the best results.

WordPress Categories Vs. Tags

WordPress creates archive pages for both categories and tags as a way group posts. WP categories and tags are accessible from the Add New Post and Edit screens. New site owners often misuse them through ignorance. These are easy mistakes to avoid once you know the differences between the way categories and tags group content.

How to use WordPress categories

Parent categories are like the genre of written articles. Let’s use a website about wildlife to illustrate. You might categorise your posts into Fish, Birds, Mammals, and so on. Categories like these are very distinct and help to organise posts into their respective genre. You can also assign WP posts to several categories, but 3 or less is the usual recommendation.

How to use WordPress subcategories

WordPress subcategories or child categories also have a place. They can enhance SEO and improve site navigation further for visitors. But why have subcategories as well as categories? Well, the wildlife example above has categories for Fish, Birds, and Mammals. It would help to sub-categorise the wildlife into Diurnal (day), Nocturnal (night), and Amphibians, etc.

Another example could be for a website or blog on world continents and countries. The category hierarchy might look something like the table below.

Parent Category

Europe

North America

South America

Asia

Child Category

  France

  USA

  Argentina

  India

 

  German

  Canada

  Bolivia

  Indonesia

  Spain, etc.

  Mexico

  Brazil, etc.

  China, etc.

Tags Vs. Categories

Tags also help to group posts, but in a more detailed way. You might add tags to articles in the Fish category for Freshwater, Saltwater, Carnivores, and Herbivores. Other tags could include Cyprinids, Esocidae, and Gasterosteidae. It’s useful to add multiple tags to a post where it’s appropriate, while it’s better to use categories more sparingly.

As with categories, you can add new, remove, or delete tags at your will.

How to Add a New Category in WordPress

Adding categories to WordPress posts takes only seconds whatever theme you’re using. Some authors like to create them in advance for a series of related posts so that they don’t forget to add them. Let’s do that using the Continents (parent) and Country (child) example above.

Log in to your WP Dashboard at the Administrator level.

Click Posts => Categories from the side menu.

The Add New Category form is quite straightforward, but there are a couple of things to note.

The slug is used as the URL-friendly name for the category. When there are two words or more, WordPress automatically replaces any spaces with a hyphen like so: south-america

For a new main category, leave the Parent Category dropdown at None (see next image).

OK, fill out your category form as appropriate. Remember to add a description, then click the Add New Category button.

Here’s how our parent category dropdown looks for the 4 continents.

The only thing different for creating a child category is to select a Parent Category from the dropdown. Let’s add the India subcategory to the Asia main category.

You can see it’s a subcategory by the dash () that precedes it in the Name column.

The new category hierarchy is evident in the Categories area (see next image). If it doesn’t show main and sub relationships, press F5 on your keyboard to refresh the screen.

Here’s how our Continent (parent) and Country (child) examples look.

Our SEO-friendly URL for the first arrangement looks like this:

https://teachingxyz.com/category/asia/india/

You can clean these URLs up further by removing the category prefix. Some plugins can do this, but there’s also a plugin-free hack that does the same thing.

From your WP Dashboard menu, go to Settings => Permalinks.

You’re now at the Permalink Settings screen.

  1. Scroll down and click the Custom Structure radio button.
  2. Copy and paste /%category%/%postname%/ into the Custom Structure field.
  3. Scroll down to the Optional section and place a period in the Category Base field
  4. Click the Save Changes button

Our SEO-friendly URL for now looks like this without the category prefix:

https://teachingxyz.com/asia/india/

Add Categories from the Add New Posts Screen

You can also add categories and subcategories from the Add New Posts screen.

Click Posts => Add New from the side menu.

Write your post then select the appropriate Categories from the categories section (right).

You have the following options:

  1. Select individual or all existing categories for the post
  2. Choose from the Most Used categories
  3. Add New Category

Do the following to add a PARENT category:

  1. Click + Add New Category link
  2. Enter the new category name

Skip the Parent Category dropdown

  1. Click the Add New Category button

Do the following to add a new CHILD category (subcategory):

  1. Click + Add New Category link
  2. Enter the new child category name
  3. Click the Parent dropdown to select the parent category
  4. Click the Add New Category button

Add Categories to Published Posts

You can also add categories to published posts as well as new and draft posts. The fastest method is via the Quick Edit option.

Go to Posts => All Posts from the Dashboard side menu.

Place the cursor over the post title you want to add categories to and click the Quick Edit link.

  1. Select categories and subcategories from the Quick Edit screen
  2. Click the Update

You can also perform a bulk action if you need to add the same categories to several posts.

  1. Put a tick (check) into the boxes next to the selected posts
  2. Click the Bulk Actions menu
  3. Select Edit from the dropdown

Click the Apply button once you’ve selected all the posts for bulk edit.

Tick (check) the category boxes for the selected posts then click the Update button.

How to Add Categories to Sidebars

Visible categories help your visitors navigate the site more easily. WordPress shows a post’s categories by default. However, some site owners prefer to show all their categories site-wide. The usual place to list these is in the WordPress sidebars, so let’s go ahead and do that.

Go to Appearance => Widgets from the Dashboard side menu.

Drag the Categories Widget into the widget-friendly sidebar area.

Move the widget to where you want the categories to display.

Next, click the widget’s down arrow to reveal its settings.

Put a tick (check) into the Show hierarchy box and click Save.

Closing Comments

WordPress categories offer webmasters an effective way to organise posts. Moreover, they encourage visitors to navigate the site and find new content. And the more you can get visitors to stay on your pages and interact, the more popular your blog, site, or store becomes.

Want to Learn WordPress?

WordPress is an amazing platform for building any type of website.   It’s used by large corporations and small mom & pop sites.

You may also like

Comments

Leave a Comment

Your email address will not be published. Required fields are marked *

Hello, I'm
Andy Williams!

You can get up to 90% off my Online Courses for webmasters, marketers & affiliates (plus a free course on Gutenberg).

Create your own WordPress Theme

It's built in to WordPress using Gutenberg, and my new course shows you how.