A reader recently inquired about how to create subcategories in WordPress.
WordPress allows you to organize your posts into categories and tags. You can even divide your categories into subcategories to further organize your information.
Content categorization can also help your website rank higher in search engines. It’s critical to use categories and subcategories correctly so that your readers can find the content they’re looking for.
We’ll show you how to add categories and subcategories in WordPress step by step in this article.
Understanding WordPress Parent and Child Categories
They’re more than just a way to organize your data. They can also assist you in creating a meaningful and semantic site structure. Categorization is a useful tool. This is extremely beneficial to your WordPress SEO.
This explains the differences between categories and tags, as well as how to use them correctly. Important: If you’re not sure what the difference between categories and tags is, check out our category vs tag guide.
You may be wondering why and when you should use child categories (subcategories) on your WordPress website.
Users may want to be able to search for articles by both country and city. Assume you’re starting a travel blog for various locations around the world.
You might write an article about the best 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 best 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.’
We could have left ‘United States’ unchecked in our example and simply placed the post in the ‘New York City’ category. A post that is filed in a child category does not have to be filed in the parent category as well.
This is especially useful when it comes to avoiding duplicate content. If you submit a post to a child category but not to the parent category, it will only appear on the child category’s archive pages.
After that, let’s look at how to add both regular and child categories to your WordPress site.
Creating a WordPress Category
When writing a post in WordPress, you can 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’ link.
When you click the link, two new boxes will appear, one for each category you want to add. You don’t need to select anything from the Parent Category dropdown for a regular category.
After you’ve given your category a name, click the ‘Add New Category’ button.
For your current post, the box for that category will be automatically checked. If you want, you can uncheck it.
You can also add a new category to an existing post without editing it.
If you want to create all of your categories before adding content, this is a good option. Add your new category by going to Posts » Categories.
You can also change the slug (URL) for your categories using this method. You can even write a description for them. Learn how to use WordPress to add SEO keywords and descriptions. You can also rename and delete categories here.
In WordPress, you can create a child category (also known as a subcategory).
You can create and edit child categories in the same way that you created and edited parent categories.
From the dropdown list, choose the category you want to use as the parent. Open the Categories tab while editing a post and type in the name of your child category.
Simply type your child category’s name and choose the parent category from the dropdown menu. You can also add child categories by going to Posts » Categories.
For example, we could decide to create a category structure based on continents, countries, and cities, as shown below: If you want, your child categories can have their own child categories.
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.
The United Kingdom and Spain, for example, are sibling categories. Within a parent category, categories on the same level are sometimes referred to as “sibling” categories.
There can only be one parent per category. You can’t have two parent categories with the same sub-category.
The SEO Advantages of a Site Structure Based on Categories
The following is an example of a category URL:
This is important because it tells search engines and visitors what your page is about. Keywords aid in the discovery of content via search engines. You also have the option of including keywords in your URL.
You can even get rid of it entirely if you want. You can also easily change the /category/ prefix on your category URLs in WordPress.
Simply go to the Settings » Permalinks page and scroll down to the section titled “Category base.”
Here you can enter the prefix you want to use and save your changes by clicking the Save Changes button.
Simply install the plugin, and the word “category” will be removed from the URLs of your category archive pages. Installing the FV Top Level Categories plugin may help you get rid of it. Instead, they’ll appear as follows: The ‘category’ prefix in your category URLs adds no value to your SEO.
Important: If you want to change the category base on an existing WordPress site, you’ll need to set up redirects to prevent search engine visitors from getting 404 errors. Please see our guide on how to change the category base prefix in WordPress for more information.
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 in your WordPress dashboard.
If you haven’t changed 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 assigned to them.
To do so, simply check the ‘Show hierarchy’ box in the widget. Don’t forget to save your work by clicking the Save button. If you want, you can make it so that the child categories (subcategories) appear beneath their parent categories.
Your parent categories should now be visible on your site, with the child categories nested beneath them.
If your sidebar changes aren’t showing up, try clearing your WordPress cache.
The menu can then be added to your header menu, sidebar, footer, or other menu locations. You can use the WordPress navigation menu to create custom category menu links in addition to the default category widget.
We hope you found this tutorial on how to add categories and child categories to WordPress useful. You might also be interested in our article on how to create an email newsletter to increase traffic to your website, as well as our comparison of the best WordPress page builders for creating custom layouts.
Please subscribe to our YouTube Channel for WordPress video tutorials if you enjoyed this article. You can also find us on social media sites such as Twitter and Facebook.
15 Things You Must Do Before Changing WordPress Themes Checklist
How to Transfer Your Blog from WordPress.com to WordPress.org Correctly
Why is it so important to build an email list today? (6 Reasons)
Step-by-Step Instructions for Starting Your Own Podcast
Editorial Staff Information
Over 1.3 million readers around the world rely on it. WPBeginner’s Editorial Staff is a group of WordPress experts led by Syed Balkhi.
Hello, How can I create a parent category that encompasses all of the posts in its subcategories, similar to the one found on this website (https://kiuz.it/blog/)?
That’s your posts/blog page, which you can customize under Settings> The act of reading
Should I also check the parent category when using child categories, or should I leave it unchecked?
When adding a post to a category, all you have to do is check the child category.
2. When I check both the child and parent categories, the URLs for my posts show: www.my-site.com/parent-cat/post-name/, which is what I want. If I checked both, there would be no problem with duplicate content having a negative impact on SEO. I have my permalink structure set to /%category%/%postname%/ and I want the parent category to be visible in the URL. 1. My post URLs are: www.my-site.com/parent-cat/child-cat/post-name/ when I check the child category. So, should I also check the parent category, or leave it unchecked?
Your URLs are structured in this way because your parent category is used first. Although it shouldn’t have an impact on your SEO, you can use both categories if you want. https://kiuz.it/wp-tutorials/wp-tutorials/wp-tutorials/wp-tutorials/wp-tutorials/wp-tutorials/wp-tutorials/wp-tutorials/wp- Otherwise, we recommend that you read the following recommendations from our article:
Is it possible to use subcategories for products?
Yes, if your eCommerce plugin permits it.
I made my top-level category a drop-down menu, but when I click on category in my primary sidebar, it says “select category” and doesn’t show my subcategories. What am I supposed to do now?
If we’re understanding your requirements correctly, you’ll need to manually add subcategories.
Is it possible to generate multiple articles for the main category without choosing a subcategory (with a few subcategories)? Is this SEO beneficial?
If you don’t want to use subcategories, you can have multiple posts in a single category; however, how useful it is and whether it has an SEO effect will depend on the overall organization of your site.
When I add a new show auto to the menu, I need to know how to display sub-category shows in the menu.
Take a look at our guide below for more information on customizing your menu:
How do I make the blog post appear on the appropriate category page automatically? Thank you very much in advance! On my homepage, I have six categories. When you click the image on the homepage, you’ll be taken to the category page for that category. I’ve been doing it by hand, but I know there must be a better way. I’m having trouble posting on my blog.
For WordPress to automatically list the posts in a category, you should be able to link to the category page. You should not create your category pages by hand. By adding a category to your menu, you can get a link to your category page.
If you don’t want duplicate content, this is the way to go. You mentioned that if the item isn’t attached to the parent and only the child, it won’t appear in the parent.
Is it possible that if both are attached, there will be an SEO issue with duplicate content? I’m aware that duplicate content is frowned upon by Google, but you didn’t say so.
Please accept my sincere gratitude.
In either case, duplicate content should not be an issue.
Thank you very much, wpbeginner. That’s great.
Thank you for taking the time to read our article; we hope it was useful.
It doesn’t bother me at all…unless it should for some reason. Because the word â€ categoryâ€TM appeared in the URL, I was told I was creating my categories incorrectly. I read a few posts on how to create categories, but yours was the only one that explained how to do so. Julie is a woman who has a I despise having to install yet another plugin. So, how bad is it to be in this situation? Thank you,
You can always change the names of your categories if you want, but it’s not a requirement. For the most part, you shouldn’t be concerned about adding more plugins. Because search engines don’t specify their preferences other than being simple to understand, there is a lot of room for personal preference. Take a look at our article on plugins here: https://kiuz.it/opinion/how-many-wordpress-plugins-should-you-install-on-your-site/ for more information.
I’d like to display only the categories that are relevant to this page’s topic. Is it possible to sort the categories?
You might want to look at our guide on adding conditional logic to menus for what you’re looking for: https://kiuz.it/plugins/adding-conditional-logic-to-wordpress-menus/
Anna is a student at the University of Best wishes, It was well-written, and I was able to resolve my category/subcategory issues in less than 5 minutes. Thank you for providing this tutorial.
We’re glad our article was of assistance.
What’s the best way to get it back to default? Hello, I’m in need of assistance. I pressed the Make a Default button by accident.
Under Settings>Writing, you can change which category is the default, but you must have at least one default category.
that is to say… Is it possible to make a hierarchy with parents, children, grandchildren, and great grandchildren, for example?
Resturants in Canada > British Columbia > Vancouver Hotels in the United States > Nevada > Las Vegas Hotels in the United States > New York > New York City Hotels in the United States > California > San Francisco
If you wanted, you could have multiple subcategories beneath a subcategory.
3)Select Subcategory, so that related categories and subcategories are displayed alongside the product. 1) There are three fields in a form: categories, subcategories, and products. In the form, how can I represent woocommerce categories, subcategories, and products: 2)In the subcategories field, if we select one category, the related subcategories should be displayed. 4) Finally, when we submit the form, it should take us to the checkout page.
You might want to look at the plugin in our article: https://kiuz.it/plugins/how-to-let-users-filter-posts-and-pages-in-wordpress/ instead of using a form.
Hello, I’m having a problem. For example, I’d like to link one subcategory to a few parents:
panel (outside) panel (inside) panel (outside) panel (inside
Parents are represented by the outdoor and indoor panels, while the child is represented by the panel.
Thank you very much. Could you please assist me?
There is a single category with multiple parents. This is the simplest example of a many-to-many relationship within a category.
Unfortunately, WordPress is a shambles, and this feature is currently unavailable.
Thank you very much. The sun is shining. How do I go about resolving this issue? When I click on the parent, I don’t want all of my posts to appear. I only want to see the posts that are directly placed in each category, and then I want to see a list of each subcategory, just like in Windows Explorer.
Instead of having a static homepage, I’m helping a friend switch update their website, and upon investigation, they built it primarily from categories and subcategories, with only four (unfinished and unlinked) pages and the reading setting set to show recent posts. The main menu is organized into categories, with subcategories highlighted beneath them.
My question is, how can I update the site by adding a static homepage and other primary pages for the posts to be listed on without disrupting the overall content organization?
In Woocommerce, how do we add a third level of subcategory?
Thanks for such a fantastic article, it was extremely beneficial to me.
Any assistance would be greatly appreciated. Hello there, fantastic website. I looked and looked for a plugin that didn’t work, and I even paid for one that didn’t work. I have a question for which I hope you can provide an answer: is there a plugin that allows me to place small images on the left side of post summaries on the landing page? Thank you for assisting me in the development of my website.
Like all of your tutorials, this one is extremely useful. Thank you for providing this tutorial. I always come here to learn about best practices and find useful plugins.
So, what is the purpose of a sub-category? I can simply have two categories: “United States” and “New York,” and then drag “New York” under “United States.” They’ll be displayed as category / subcategory, with the exception that they’re both categories.
I have the option of assigning an article to both or just one of the categories.
So, what’s the point of a subcategory?
Subcategories allow you to divide a category into subtopics. An article filed in a sibling category, on the other hand, will not appear in other sub-categories within the same parent category. An article filed in a subcategory appears in the parent category as well.
To avoid duplicate content, I’ll need more than one post in each child category. Is there a way to circumvent this? When you have a menu or website navigation made up of categories, you’ll run into issues. To create a proper menu, you must wait until the blog is large enough to have a few articles in each sub category. When assigning posts to both parent and child categories, the most common problem is duplicate content. For example, I want the same post to appear in both the parent category “United States” and the child category “New York.”
It shouldn’t be an issue. The url of the page/post remains the same, it is mentioned in the category page, and Google recognizes this (their bots are extremely smart). To avoid it even more, I recommend installing YOAST SEO, a free plugin that is great for SEO and includes a setting to avoid duplicate content from categories.
Anja is a young woman who has a I hope this information is useful.
Hello there, everyone!
I’ve been working on my website for days, trying to figure out how to work the sub menus on my two blog categories, lifestyle and television series. The first submenu works fine, but the second level up to the fourth level is completely unclickable.
I’ve tried everything, including plugins.
Is there anyone who can assist me with this? Thank you very much.
sinceramente, a rose
This is an excellent article. This was extremely beneficial!
Question: You mentioned how to make the child categories appear in the blog sidebar, but how do I make them appear as drop downs in the top bar?
Go to Posts -> All Posts to do so. The Categories section is one of them. After that, select the posts you’d like to add to a category, go to the Bulk Actions tab, select Edit, and then hit the Apply button. After that, you’ll have a few options to tweak for those posts.
Please respond. In WordPress, is there any reason for this? I’m using category and subcategory, but my URL doesn’t reflect them.
My category pages currently display the subcategory POSTS. I’d like my category pages to display the sub-category PAGES for each post.
What am I supposed to do now?
Thank you for a great read!
I’m wondering if it’s better to use the following permalink structure: 2. Inventive+ phrasing 1st. /continent/country/destination/%postname% or /continent/country/destination/%postname% /%postname%%%%%%%%%%%%%% I’m currently working on a website based on your example. I’m not sure if the first option is preferable because it’s getting a little long.
Thank you for your assistance!
What if you want the categories to run across the top of the page rather than down the left?
Thank you for your assistance!
I’m familiar with the category and subcategories you described. There’s something I’d like to add to my website. The audios, videos, and flashcards are all the same. Is it possible to do so without duplicating work? Thank you for writing this article. I create a category for a course with the course name, and then I create sub-categories for books, audios, videos, and flashcards. I also want a page that displays all of the books from all of the categories I have on one page.
Mississippi -> Jackson, as well as Alabama -> Jackson, would be ideal. Both states have Jackson counties, but they should be unrelated. Is it possible to have a subcategory with the same name as another? Is there a way to do this? For example, in the United States, counties are classified as State -> County.
I created a category using the simple instructions above (go to POSTS–create a new category…), and it appears on the right, correctly as far as I can tell, but not on the main page under categories. It’s impossible to get it there; instead, only the default “uncategorixed” appears. It’s odd because I need to use Kudani to make a post about distance, but it also seems to think I don’t have a category…..
It is not sufficient to simply create a category. It’s also possible that you’ll need to assign at least one post to that category. WordPress does not always display empty categories by default.
This is fantastic information! Thank you kindly!! I finally got around to making a sub-category.
I’m glad it was useful to you.
What if I want my two subcategories to be visible on their parent category page?
I understand that there is some code, but where should I paste it in the functions.php file?
Thank you very much.
I’m wondering the same thing. Please let me know if you have found a solution.
Thank you for the tutorial.
Do you have any suggestions for overlapping categories? For example, my DIY site frequently features items made of wood, as well as how to repair or maintain items made of wood. Do I put ‘wood’ in the ‘repair’ or ‘maintain’ category?
Plus, there are so many different materials (metal, tile, fabric, etc.) that I’m not sure which to put first: material or action?! I wish I had a needle-narrow skill set on occasion! In any case, it appears that I will have duplicate subcategories…
Is there a limit to the number of categories? What am I doing incorrectly? I currently have ten displayed, but there are twelve listed, so two aren’t visible. Is it possible to add more so that the last two appear? When I go to my live site, I see two spaces on the third row, but they don’t appear.
Please see our tutorial on how to display empty categories in WordPress widgets for more information. WordPress does not display empty categories in category lists by default.
Is there a limit to how many categories WordPress allows?
I have a lot of subcategories and wordpress won’t let me add any more. It seems like it’s just deleting an old category to make room for a new one?
Is there anyone who can assist me?
The scenario you’ve described is exactly what I’m dealing with right now. Now, let’s look at the situation I’m in. Thank you for writing this article.
Parent Category: Australia; Child Category: NSW; Sydney; Sydney; Sydney; Sydney; Sydney; Sydney; Sydney; Sydney; Sydney; Sydney; Sydney; Sydney; Sydney; Sydney
I also have three additional Parent categories that are on par with Australia.
Various Microsoft is a company that specializes in Apple Inc.
Because I’m using ajax search to filter the results based on hierarchy, I now assign Parent & Child categories when I create a post. In addition, I choose one of the parent categories: Apple, Microsoft, or Other.
I now have a search box that allows me to sort the results by country, city, or town. I’d like to add another search box where I can sort by Apple, Microsoft, or other criteria; for example, if I select Apple, it should display Australia -> NSW -> Sydney.
In this search, it appears that the country (parent) category will be a child category.
Is that even possible?
Thank you, Rahul.
It has a taxonomy filter that could be useful in your situation. Look into the SearchWP plugin.
When the mouse is hovered over a category, how can I make my subcategory appear? Any assistance would be greatly appreciated. I don’t want the category’s subcategory to appear beneath it. I’d like it to appear when you hover over a category…. Thank you for the tutorials, they were extremely helpful.
I’d like to show hotels and car rentals in different countries, so: I’m having a hard time figuring out how to solve this category problem.
Country -> United States -> Alabama -> Montgomery -> Australia -> New South Wales -> Sydney
The ultimate parent category I’d like to have is country.
Then I’d like to show either all the hotels or all the car rentals in that city.
So, in general, countries will have both hotels and car rentals, but I’d like to show only hotels in Sydney if the user chooses to show only hotels or only car rentals.
There is a need for assistance.
But in my case, I added some categories on the first day after hosting the site (wordpress), but after a while (a few days later), I couldn’t add any more. hello there, admin. When I fill out the category form, it adds to the list, but it does not appear on the site’s homepage. In your tag, I discovered a very interesting post.
A category will not appear on your site until a post in that category is published.
Are the categories you mentioned in this post only for POSTS, or can they also be added for PAGES? I don’t see any way to make a category for PAGES.
You can, however, make categories and tags available for pages using a plugin. See our explanation of the distinction between posts and pages. Pages cannot be categorized by default.
Thank you for making it so simple to comprehend. This was exactly what I needed!
Thank you very much. I was working on a product listing project and found this article to be extremely helpful. I needed a lot of category subcategory options, and this tutorial helped me get there.
I added a new subcategory to an existing list, but it doesn’t appear on the blog page? Thank you very much.
Thank You Very Much For This Article, It Is Very Beneficial!
I’m afraid I won’t be able to do it…. If that’s the case, what’s the best way to go about it? Is it possible for a parent to have more than one child category?
Yes, indeed. When creating a new category, you should be able to select its parent category.