How to Add Categories and Subcategories in WordPress
WordPress allows you to organize your posts into categories and tags. You may also divide your categories into subcategories to properly organize your information.
It’s critical to use categories and subcategories effectively in order to assist your viewers in finding the content they’re looking for. Content classification can also help your website rank higher in search engines.
We’ll show you how to add categories and subcategories in WordPress step by step in this tutorial.
Understanding WordPress Parent and Child Categories
A categorization is a useful tool. They’re more than just a technique to organize your data. They can also assist you in creating a relevant and semantic site structure. This is really beneficial to your WordPress SEO.
You may be asking why and when you should use child categories (subcategories) on your WordPress website.
Assume you’re starting a travel blog for various locations across the world. Users may want to be able to search for articles by both nation and city.
You might write an essay about the top waterparks in the United States, for example. It would make sense to categorize that post as ‘United States.’
However, you may have articles about the top restaurants in New York City, Los Angeles, Chicago, and other cities.
You can use subcategories or child categories here. The parent category can be ‘United States,’ and the child categories can be cities.
A post that is filed in a child category does not have to be filed in the parent category as well. We could have left ‘United States’ unchecked in our example and simply placed the post in the ‘New York City’ category.
If you submit a post to a child category but not to the parent category, it will only display on the child category’s archive pages. This is especially useful when it comes to avoiding duplicating content.
After that, let’s look at how to add both regular and child categories to your WordPress site.
Creating a WordPress Category
When composing a post in WordPress, you may easily add a new category. Open the Categories tab in the Document panel on the right hand side.
Then, to create a new category, simply click the ‘Add New Category’ option.
When you click the link, two new boxes will appear, one for each category you want to add. You don’t need to pick anything from the Parent Category selection for a standard category.
Click the ‘Add New Category’ button after you’ve entered your category’s name.
For your current post, the box for that category will be automatically checked. If you want, you can uncheck it.
You may also add a new category to an existing post without modifying it.
Add your new category by going to Posts » Categories. If you want to create all of your categories before adding content, this is a good option.
You can also change the slug (URL) for your categories using this way. You can also rename and delete categories here. You can even write a description for them. Learn how to use WordPress to add SEO keywords and descriptions.
In WordPress, you can create a subcategory.
You can create and edit child categories in the same way that you created and edited parent categories.
Open the Categories tab while editing a post and type in the name of your child category. From the dropdown list, choose the category you wish to use as the parent.
You may also add child categories by going to Posts » Categories. Simply type your kid category’s name and choose the parent category from the dropdown menu.
If you desire, your child categories can have their own child categories. For example, we could decide to create a category structure based on continents, countries, and cities, as seen below:
Europe is a category in this case, with the United Kingdom and Spain as children. The United Kingdom’s York and London, and Spain’s Barcelona and Madrid, each have their own child categories.
“Sibling” categories are those within a parent category that is on the same level. The United Kingdom and Spain, for example, are sister categories.
Categories can only have one parent. You can’t add one sub-category under two different parent categories.
The SEO Advantages of a Site Structure Based on Categories
The following is an example of a category URL:
This is important since it tells search engines and people what your page is about. You also have the option of including keywords in your URL. Keywords aid in the discovery of content via search engines.
You can also easily update the /category/ prefix on your category URLs in WordPress. You can even get rid of it entirely if you want.
Simply scroll down to the ‘Category base’ section on the Settings » Permalinks page.
Here you can input the prefix you want to use and save your changes by clicking the Save Changes button.
The ‘category’ prefix in your category URLs does not improve your SEO. Installing the FV Top Level Categories plugin may help you get rid of it. Simply install the plugin, and the word ‘category’ will be removed from the URLs of your category archive pages. Instead, they’ll appear as follows:
Important: If you want to alter the category basis on an existing WordPress site, you’ll need to set up redirects to prevent search engine visitors from getting 404 errors.
In the WordPress Sidebar, how to Display Categories and Child Categories
To display a list of categories, add a widget to your WordPress sidebar or footer. Go to Appearance » Widgets on your WordPress dashboard.
If you haven’t altered your widgets from what WordPress installs by default, the Categories widget should already be there. If not, you can drag and drop it from the left-hand side’s list of Available Widgets.
By default, the widget displays all of your categories in alphabetical order in a flat list:
Tip: Categories will only appear in the list if they have at least one published post attached to them.
If you choose, you may make it so that the child categories (subcategories) appear beneath their parent categories. To do so, simply click the ‘Show hierarchy’ box in the widget. Remember to save your work by clicking the Save button.
Your parent categories should now be visible on your site, with the child categories nested beneath them.
You may use the WordPress navigation menu to generate custom category menu links in addition to the basic category widget. The menu can then be added to your header menu, sidebar, footer, or other menu areas.
We hope you found this guide on how to create categories and child categories in WordPress useful.
Comments are closed.