Unleash the Power of Using Categories in your WordPress Web Site
Written by Becky Bruso
In this post we will explore how to add categories and the way they are used in WordPress. This article will detail how to add categories in WordPress and will have a visual image of the process in action.
I have also included a short desktop video which demonstrates exactly how to add and use categories. It includes audio instructions as well. I wrote and recorded both methods to provide you with the ability to pick which method is best for you to see how categories work.
Categories are one of the best features of WordPress as they allow you to organize your information for your own use and for that of your web site visitors.
A well-organized web site provides a positive experience for those visiting your web site by helping them to easily locate the information they have come to find. It can make the difference between someone staying on your site or clicking away in frustration.
Let’s take a look at how to add and use categories.
Video Demonstration of Adding and Using WordPress Categories
Written Instructions on Adding and Using WordPress Categories
How to Add Categories in WordPress
To add a category, go to the WordPress Dashboard, click on Posts. Here you will see the dashboard menu selections expand to show categories. Click on Categories, simply type the name of your category in the box and save your changes by clicking on add new category.
I don’t fill in the description here unless it is one which is intended for web visitors to see as well. I choose not to add a description and document it outside of WordPress since some themes show the category description on the front end of your web site. This may not be desirable for you to show this description to the world, unless you have created your category descriptions with your web site visitor’s needs in mind.
I also do not add a specific name as a slug, unless I have defined a need to do so. One will automatically be assigned by WordPress anyway.
How to Assign a Category to a Post
Assigning a category to a post is a snap. In your post editing screen, you will typically see the categories panel on the right hand side of the screen. Sometimes this is either folded up or not visible due to screen options in effect. In the event your categories panel is folded up, simply click on the downward facing triangle next to categories and it will expand to show you the most common categories in use on your web site.
If the category panel is not visible, go to the upper right hand corner of your screen and look for the words “screen options“. Click on this to expose more features for your editing panel. If your categories aren’t visible in your editing panel, they are most likely unchecked under screen options. Simply check the box next to categories under the screen options choices, and your categories will now be available in your post editing panel.
How to Set a Specific Category to Auto Assign in WordPress
Suppose you always are writing about a specific topic and want to set it up so that WordPress will automatically use that category in your posts. There is a way you can set it and forget it by using the WordPress default category settings. In this case, you set up a default category so that your posts are automatically assigned to your preferred category when you begin to write.
Default is computer speak for something that automatically happens without any need for you to take action.
To set your default categories, go to Settings, Writings on your WordPress Dashboard. Locate the default category drop down box, then select your default category. A visual of this screen is shown below. Be sure to save your changes before exiting this screen.
How to Create a Parent-Child Category Relationship
Let’s assume that you have a category and sub-category relationship for some of the content on your web site. Within WordPress, you can create a parent category for sub-categories of information. To do this, you start by adding the category you wish to be the parent just as you would any other category. Begin by selecting Posts then Categories from your WordPress dashboard, then select add category.
Next, you will need to edit each of the categories you wish to make children. To assign a parent, locate the drop down box with the parent title, and select the category you wish to have as the parent. The image below shows what the screen where this is done looks like.
How to Add A Menu Item Based Upon A Category
Once you have added categories and created posts and labeled them with specific categories, you are able to use these categories as a menu item for the main navigation of your site. To add a category to your menu, go to the dashboard of your web site, pick Appearances, then Menus.
Once under menus, you will see that you have options of pages, links, and categories to choose from as potential menu items. If you expand the downward triangle option next to categories, you will see a list of your most frequently used categories. If the category you want is not shown, click on the link to show all categories.
Once the category you want to add is shown, click add to menu as shown in the above image. The item you selected automatically gets put at the bottom of the menu list and is assigned a navigation label which is the same name as your category. You can rename the menu item title to be anything that you want. You can also move the position of the menu item to where you would like it to be in the list by clicking on it and dragging to the desired location.
Notice that you can create sub-menu items by clicking and dragging menu items slighty indented under the item you want to be its “parent” on the menu. In the examples, we set up vegetables as the parent category, so it follows that all the other vegetables which were assigned a parent category of vegetable would be indented under the menu item vegetable.
How to Add Category Lists to Sidebars and Footer and Widget Areas
WordPress has some built-in features for categories. It allows you to add your categories to other screen areas of your web site with little more than a click and drag and drop. You also get the choice of how to display these. You can select from a traditional list format, hierarchical format, and/or drop down list box format.
Next, I will talk about the three ways you may display your categories. As already noted, these are as a hierarchy, as a drop down list box, or as a post count. This example following in the next paragraph will look at adding categories to the right sidebar.
To add categories to other areas of your site, go to the dashboard, select Appearance, Widgets. The image to the left shows the three options you have to select from. You will have the option to place categories on any of the sidebar areas your theme uses. The behavior is the same no matter which widget area you select.
The first image beneath this paragraph shows what the front end will look like when the parent category choice was selected and displayed as a hierarchy. You will note that each parent category is shown with its “children” listed underneath it as a series of links.
In the example below, the uncategorized categories have been included. If you don’t want to have your posts default to uncategorized, I suggest you set a default category for posts as I described above. You might also consider deleting the uncategorized category so that it doesn’t show up in your widget sidebars if you opt to set up your widget sidebars as I just described.
The next image shows what the choice of using a drop down list box in the sidebar area will look like. You will now see that the listing has been hidden until a web visitor clicks on it to expand the categories available.
The option to display as post counts is just like the hierarchy in that it shows up as a series of links. The difference between this and the hierarchy is that this option will keep a tally and count the number of posts in your given categories and display this count as part of the link information.
Whichever you select and where you place it on your sidebar widget or footer areas are entirely up to you!
What Can Go Wrong When Trying to Use Categories in Menus?
I always like to include a what can go wrong section as the instructions I have provided work when WordPress is installed and templates and coding follow WordPress Best Practices.
Best Practices would mean that the web developer you used to create your web site followed the recommended approach to use a child theme if doing highly customized coding for your web site. I realize this has no meaning to you as coding is not your thing.
It does come full circle; however, when you try to follow instructions like I have provided here and your web site doesn’t behave the same way.
I have run into issues with highly customized web sites where adding categories to the menu is not possible in the way I have described in this article. I suspect the real reason behind this is that the web developer who built the site didn’t follow the Best Practices I outlined above.
The end result for the web site owner is completely frustrating as they are not able to take advantage of a very powerful feature which should be part of WordPress.