What is a Category? How to Use Categories in WordPress

Last updated: 04-14-2021

Read original article here

What is a Category? How to Use Categories in WordPress

Category is one of the default taxonomies in WordPress. You can use categories to sort and group your blog posts into different sections. For example, a news website might have categories for their articles filed under News, Opinion, Weather, and Sports.

Categories help visitors quickly know what topics your website is about and allows them to navigate your site faster.

The default category in a new WordPress installation is “Uncategorized“. If you don’t pick a category for a post, then the post is automatically placed into the default category. Only a WordPress administrator can change the default category from the Settings » Writing screen.

When editing a blog post, you can add it to a category by checking the box next to the category name.

If you need to add a new category while you’re editing a post, just click the Add New Category link below the list of your existing categories.

You can also add a category directly from the Posts » Categories screen. Type in a name for your new category and add a slug. You can create URL friendly slugs for your posts using lowercase letters, numbers, or hyphens.

If you do not type something in the slug field, then WordPress will automatically create a slug name that is based on the category name. Slugs create a link to your category page that lists all posts that you have created in that category.

Categories are hierarchical, meaning that each one can have child categories. A child category is used for a sub-topic under a broader topic. For example, a news website may have a category News with child categories for Local, National, and Global news.

To create a child category, go to the Posts » Categories screen and select a parent category from the dropdown menu. Then fill in the name for your child category, adding the description and slug are optional.

Now click the “Add New Category“ button and your child category will be created.

Categories can be edited from Posts » Categories screen. Move your mouse to the category you want to edit and then click on the “Edit” link. This will open the editor where you can add or remove parent and child categories, change the category name, slug, or description.

You can also delete categories from the Posts » Categories screen. Deleting a parent or child category doesn’t delete your posts. WordPress automatically places posts that aren’t assigned to a category in the default category.

An administrator must create a new default category or assign it to an existing category before the default “uncategorized” category can be deleted.

Want to make it easy for your website visitors to find your blog post categories?

One common way to do this is by placing a list of your categories in your sidebar.

Categories can be displayed in the sidebar using a categories widget. Go to Appearance » Widgets and drag and drop the categories widget in a sidebar. All your categories will be displayed in the sidebar, except those which do not have posts.

The category widget allows you to display your categories as a dropdown menu or a list. You can also choose if you want to display the number of posts in each category.

If you select the Show hierarchy option, your child categories will be indicated by special styling, which is usually an indent before the child category name. The appearance will depend on your theme. If you don’t select this option, then all your categories will look the same in the list, whether they’re parent or child categories.

You can also add categories to your website’s navigation menu. To do that go to Appearance » Menus. Next, click on “Categories”, select the categories you want on your menu, and click on the “Add to Menu” button.

For example, we’ve added our categories to our main menu here at WPBeginner.

Categories and tags are both taxonomies that are included by default in WordPress. Categories in WordPress cover broader sections of your website, while tags help to identify all the posts you have created that have been tagged with a specific word.

Think of categories like a table of contents in the front of a book. They separate the content on your website into general topics. Whereas tags are like the index in the back of a book, because they assign words that describe very specific details of your posts.

One of the biggest differences between tags and categories is that you’re required to choose a category for your posts, and if you don’t then they’re listed under “uncategorized”. On the other hand, you’re not required to add tags.

Categories help visitors understand what your website is about so they can navigate to the content they are looking for faster. They can be hierarchical if you use child categories.

Tags are not hierarchical, so there are no parent or child tags.

We wrote a full-length post defining the best uses of categories and tags that will help you better understand their uses, and the difference between the two.

At some point, you may wish to change your categories into tags or change your tags into categories. To do that, go to Tools » Import and click on “Categories and Tags Converter”. Next, click on the Run Importer button. After that, a pop-up window will open asking you to install the importer, click on the Run Importer button.

Once the importer is installed, click on Activate Plugin and Run Importer. Next, choose the conversion option you want. Now, select the items you want to convert by clicking on each one and click the Convert button.

We hope this article helped you learn all about WordPress categories and how they work! Check out the additional reading below to learn more.

You can also subscribe to our YouTube channel for step-by-step WordPress video tutorials, and follow us on Twitter and Facebook for the latest updates.


Read the rest of this article here