In this article, describe you how to add categories and sub-categories in WordPress. WordPress comes with the ability to sort your content into tags, categories and taxonomies.
The major difference between tags and categories are: categories can have child categories or sub-categories.
- First, go to domainname/wp-admin(eg: http://prittytimes.com/wp-admin).
- Login with your username and password.
- Let’s add two pages and then insert them into Help as sub-categories. Ex. Support and Forum. Hover mouse over Pages and click Add New.
- Enter new page title.
- Add some description…
- To preview this page click Preview in top right corner of the page.
- You’ll be taken to new tab.
- Everything seems OK.
- Close this tab.
- When you’re done click Publish.
- Click Add New again.
- Repeat the previous steps, just change title and description.
- Done. Now we have two pages. Let’s add them into ‘Help’ as sub-categories. Hover mouse over Appearance
- Click Menus.
- Now click View all, because we haven’t used our newly created pages yet.
- Check Forum and Support (Created pages) and click Add to Menu.
- Now we have them as just categories so grab them and drag into Help just like this…
- You can also add Support as sub-sub category.But we’ll not do that.
- When you’re done click Save Menu.
- Now go to your homepage. Click your website title located in top left corner of the page.
- Success! Two pages have appeared when you hover mouse over Help. Let’s check both of them.
- Both of them work perfectly.
Understanding Parent, Child, and Sibling Categories in WordPress
Categories are the powerful tools in wordpress. And also category is one of the pre-defined taxonomies in WordPress. It is used to group and sort content into different sections.
A website publishing content on a variety of topics can divide their website into sections using categories.
Let’s suppose you are creating a travel website for different destinations around the world.
For example, you can add United States and then post articles for New York City, Los Angeles, Chicago, etc. This is where you can utilize child categories. United States would become a parent category, and cities can become child categories.
Adding Category in WordPress
You can add a new category in WordPress when writing a post. On the post edit screen, scroll down to the categories meta box and click on Add New Category link.
You can also add a new category without editing a post. Simply visit Posts » Categories page and add your new category. This method is particularly useful, if you want to create all your categories before adding content.
Adding Child Category in WordPress
You can edit child categories the same way you added your parent categories. On the post edit screen, scroll down to categories section and click on the Add New Category link. This will show you text field for adding new category name and a dropdown menu to select the parent category.
Similarly, you can also visit Pages » Categories page. Add the name for your child category and then select the parent category from the Parent dropdown menu.
If anyone has doubts on this topic then please do let me know by leaving comments or send me an email.