What is: Category
January 17, 2020 by Troy
Category is one of the pre-defined taxonomies in WordPress. It is used to sort and group content into different sections. A website publishing content on a variety of topics can divide their website into sections using categories.
Example: A news website can have categories for articles filed under News, Opinion, Weather, Sports, etc.
If no category is specified for a post then the post is automatically filed into the default category. In a new WordPress installation, the default category is ‘Uncategorized’. A website administrator can change default category from Settings » Writing screen. A WordPress post can be filed under multiple categories and can have both categories and tags.
How to Add Categories
You can create a category in WordPress while writing a post. There is a categories meta box on the post editor screen with a list of existing categories. You can file your post in existing categories by checking the box next to the category name. You can also create one by clicking on the + Add New Category link.
You can also add a category directly from the Posts » Categories screen. Provide a name, and if you want you can add a Slug, which is a URL friendly name in lowercase and can only have letters, numbers, and hyphens. If you are creating a child category then choose a parent category. Provide a description for your category and click on Add New Category button. Only the category name is the required option to create a category and you can skip slug, parent, and description field if you want.
How to Edit Categories
Categories can be edited from Posts » Categories screen. Move your mouse to the category you want to edit and then click on Edit link. This will open editor where you can change name, slug, add or remove a parent category, edit or add description.
You can also delete categories from this screen. Deleting does not delete posts filed under it. Instead, if a post is not filed into any other categories, then WordPress would automatically file the post under the default category. It is also important to know that you can not delete a default category. To delete a default you first need to assign the default status to some other category.
How to Display Categories
Categories can be displayed in the sidebar using categories widget. Go to Appearance » Widgets and drag and drop Categories widget to a sidebar. It will list all your categories in the sidebar, except for categories that do not have any posts filed under them.
You can also add categories to your website’s navigational menus. Go to Appearance » Menus. Click on categories, select categories and then click on Add to Menu button.
On the front-end of your WordPress website, each category has their own page. Most WordPress themes come with a template called
category.php which controls the display of a category archive page. Each can also have their own template.
What is Child Category
Categories are a hierarchical taxonomy, meaning that each one can have child categories. A child category is usually used for a sub-topic under a broader topic.
Example: A news website may have a category News with child categories for Local, National, Global, etc.
You can add a child category while writing a post or from the categories screen. Just select a parent category when adding a new category and your new category will become child category.
How to Convert Categories to Tags
Categories and tags are both pre-defined taxonomies in WordPress. However, they are both different in scope. As for usage there are no restrictions, and you can have as many categories as you want. However, categories in WordPress are like broader sections of a website while tags are like keywords. Sometimes you may want to change your categories into tags or tags into categories. To do that, go to Tools » Import and click on Categories and Tags Converter. A pop-up window will open asking you to install the importer, click on the Install Now button. Once the importer is installed click on Activate Plugin & Run Importer.
This post was originally published in the wpbeginner glossary.
- How to Properly Rename Categories in WordPress
- Categories vs Tags – SEO Best Practices for Sorting your Content