Create and Assign Categories in WordPress

21/01/2020

Writing blog posts in WordPress is one of the most common tasks performed on the popular Content Management System, but when you start having more than a few posts, what happens if you'd like to show some of them on one page, some on another, or even let your users browse your posts by category?

Perhaps, like us, you have a website with a bunch of tutorial posts (you're reading one now!) but also put out news posts or information about up coming events, or anything else you can think of, and would like to keep them separate.

In comes categories - a feature which is part of the WordPress core.

Today, we'll take a look at how to create categories, and also how to assign them to a post.

How to create new categories in WordPress

Firstly, from within your WordPress admin, you're going to want to go to "Posts->Categories"

This will take you to the post categories page, which will show you a list of all existing categories, but also allow you to create new categories.

As you can see, there are a few options which need to be filled out:

  • Name - This is the name of your category, for example "News" and what you enter here is how the category will display on your website, this is case sensitive, so if you enter "news" it will show as all lowercase.
  • Slug - The slug should generally be all lowercase, this is what is shown in the URL when you visit a post in this category (assuming your permalinks are set to show categories) for example, a post in the news category would show as yoursite.com/news/post-name
  • Parent Category - A parent category can be used both for URL structure, and search/filtering on your website, for example, if you have a category called "cars", and would like to add make or model specific categories, such as "ford" you can set the parent category. With no parent category, your URL structure would be yoursite.com/ford/post-name and WITH a parent category of cars, the structure would be yoursite.com/cars/ford/post-name
  • Description - The description is rarely shown on websites, although it can be displayed on some themes. Generally, we tend to leave the description box blank, but you may prefer to enter a short description of what the category is, e.g for a cars category, you might enter something along the lines of "Latest news and reviews from the automotive industry".

Once you've filled out the form with your new category info, simply click on the "Add New Category" button.

How to assign posts to categories in WordPress

Now that we've got a category or categories set up, let's take a look at how we assign a post to a category.

It's worth noting that a post can be assigned to multiple categories at one time, or simply set to 1 category.

To assign a post to a category, either "edit" an existing post, or add a new post and then click on "Document" at the top right

Once the document section is open, simply scroll down and you should see the categories section - this will allow you to tick the category boxes you wish to assign to the post.

You'll also notice on our screenshot that there is a dropdown box "Select the primary category" - this will not show up if you only select one category, if you select multiple categories the box will automatically appear.

Once you've set the category or categories you wish to use, simply click the publish button at the top (or the update button, if you're editing an already published post).

Author

Neil Skoglund
Avid WordPress fan and founder of WPOwl - home of the best managed WordPress hosting. Neil has 3 passions in life,  coding, guitars & family.

Leave a Reply

Your email address will not be published. Required fields are marked *

Registered in England and Wales with company number 12201331.

Registered Office: 252 High Street, Aldershot, 
United Kingdom, GU12 4LP

Follow Us

Create and Assign Categories in WordPress | WPOwlCreate and Assign Categories in WordPress | WPOwlCreate and Assign Categories in WordPress | WPOwl Create and Assign Categories in WordPress | WPOwl Create and Assign Categories in WordPress | WPOwl Create and Assign Categories in WordPress | WPOwl Create and Assign Categories in WordPress | WPOwl Create and Assign Categories in WordPress | WPOwl Create and Assign Categories in WordPress | WPOwl Create and Assign Categories in WordPress | WPOwl Create and Assign Categories in WordPress | WPOwl Create and Assign Categories in WordPress | WPOwl Create and Assign Categories in WordPress | WPOwl Create and Assign Categories in WordPress | WPOwl Create and Assign Categories in WordPress | WPOwl Create and Assign Categories in WordPress | WPOwl Create and Assign Categories in WordPress | WPOwl