Categories

Categories have been around for as long as people have been sorting things into groups. If you were to categorize food, you organize it in categories like fruit, vegetables, meat, and dairy. Categories—unlike their flighty siblings, tags—are very well defined. You can think of categories as a hierarchy into which you plug the various bits of content in your blog. (Posts, pages, and links can all have categories.)

Here, you can create new categories or pick categories from a list. The example shown in Figure 6.36 shows a few existing categories in a blog.

Categories

+ Add New Caleqorv

IAN Categories!

S Uncategorized

Most Used

CI1 Book News D WordPress

Figure 6.36 Categories are related to tags but are more hierarchical.

Figure 6.36 Categories are related to tags but are more hierarchical.

note

Uncategorized is a default category that ships with WordPress; it's applied to all posts unless you change that behavior by choosing Setting > Writing > Default Post Category.

Adding categories

You can add new categories right from the Post panel. Just follow these steps:

1. Click the Add New Category link.

WordPress displays a text box and a drop-down menu below the link.

note

Only users who have Administrator or Editor privileges see this link. For more information on user roles, see Chapter 3.

2. Type a new category name in the text box.

3. To assign the new category to a parent category (essentially making it a subcategory of the parent category), choose the parent from the drop-down menu.

The example shown in Figure 6.37 adds a new category called Tutorials as a subcategory of WordPress. As you see in Figure 6.38, the subcategory is listed below the parent category.

t Add New Category

Tutorials

1 WordPress ! •

Add

Parent category Book News Uncategorlzed

5 S Llncategorlzed

— Book News ~ □ WordPress

WordPress

Words

Figure 6.37 A category can be assigned to a parent category. In this example, Tutorials is a subcategory of WordPress.

Figure 6.37 A category can be assigned to a parent category. In this example, Tutorials is a subcategory of WordPress.

* Add New Category

All Categories

— Book News

0 Uncategorized

Most Used

O WordPress

S Tuto rials

□ Words

Figure 6.38 A subcategory is listed below its parent category.

Figure 6.38 A subcategory is listed below its parent category.

Selecting Tutorials as the category for this post doesn't actually add the parent category (WordPress), as you might expect. WordPress knows that any posts categorized as Tutorial are also related to the WordPress category, however. When you visit the parent category's permalink, WordPress also displays all posts categorized in its subcategories. In this example, a user who visits www.wordpressforall/category/wordpress sees all the posts categorized in both the WordPress and Tutorials categories.

You don't have to apply both parent categories and subcategories to a post, but feel free to do so if that makes you happy. You can apply as many categories to a post as you have categories in your blog. Click the check box next to each category that you want the post to be in (Figure 6.39). If you click the wrong one, worry not; click again, and that post won't go into that category.

Figure 6.39 You can add as many categories as you like.

M Book News — Un categorized SwordPress

Tutorials S Words

Keeping track of categories

Because categories need to exist before they can be applied to a post, it stands to reason that before long, you'll accumulate many categories. Having lots of categories can be a bit overwhelming, but that's why WordPress provides the Most Used link in the Categories section, which opens the Most Used tab (Figure 6.40). This tab lists the categories you use most often—a feature that comes in very handy when you have more than ten categories.

Figure 6.40 The Most Used tab gives you easy access to the categories that you use time and time again.

—1 Book News □ WordPress

Most Used

Was this article helpful?

0 0

Post a comment