Help:Wikipedia: The Missing Manual/Building a stronger encyclopedia/Categorizing articles
When you look at the bottom of a Wikipedia article, you see category links. For example, the article Coat of arms of Copenhagen has the category links "1661 establishments in Denmark", "Culture in Copenhagen", "History of Copenhagen", "Danish coats of arms", "Municipal coats of arms in Denmark", and a bunch more category links for each symbol on the coat of arms. Category links are a big help for readers looking for articles related to a topic. Those links are there because editors like you added them. Wikipedia's software doesn't do automatic categorization, and Wikipedia employs no professional categorizers.
Adding categories to articles is easy: Just type a few words, add brackets, and publish these changes. The trick is figuring out what category links would provide maximum usefulness to readers, and that's what this chapter shows you. It also explains the other half of the categorization picture—the category pages where category links are listed. You can create and improve upon those pages, too.
Fundamentals of categorization
[edit]When you click one of the category links at the bottom of articles and other Wikipedia pages, you go to a category page. For example, in the article Zoltan Acs, if you click Category:American economists, you go the page shown in Figure 17-1.
Categories aren't limited to articles. Portal pages, Wikipedia instructional pages, and some user pages, for example, also have categories. Even category pages themselves have categories; in fact, that's a critical part of how the category system works at Wikipedia. (More on that a bit later.)
Category pages are the payoff for category links at the bottom of articles—they help readers find other articles about the same topic as the one they were reading. Without category pages, there'd be little point in adding category links to articles. Without category links in articles, category pages wouldn't have any content other than some introductory text.
Category links in articles
[edit]Wikipedia has plenty of category pages, like the one shown in Figure 17-1. These pages become more useful when editors keep adding relevant articles to them. You do that not by editing a category page, but by editing the articles themselves.
Adding categories to articles
[edit]You can add a category link to the bottom of an article in two ways: by typing the category link into the article's wikitext (in the edit box), or by adding a template to the wikitext. You do the first for the topical categories that interest readers, such as Category:Australian astronomers. The second way (with a template) is usually for marking an article as needing cleanup (improvement) work, for example, Category:Articles lacking sources from September 2007.
The basic category link
[edit]Adding a topical category to an article is easy. To add the category Toddler sports to an article, for example, open that article for editing, and type, near the bottom (more on that in a moment), the text [[Category:Toddler sports]]. Then do the standard stuff: Add an edit summary, preview your edit, and hit 'Publish changes'. The text you typed is exactly how the link appears at the bottom of the article.
There's one twist, however: When you preview, you won't see the new category above the edit toolbar, where the rest of the article is displayed. Nor will you see any existing categories for the article above the toolbar. Rather, you have to scroll down, past the edit box, past the insertable wikicode, and past the template list, to the very bottom of the window—that's where you'll see the categories displayed.
New category links always should be added near the bottom of an article's wikicode. You normally edit (add, delete, change) category links by going to the last section of an article and clicking the "edit" link. If you find any category links anywhere other than in the last section of an article, move them.
Category links from templates, for maintenance and stubbing
[edit]You usually create cleanup or maintenance category links with a template. For example, adding the template {{unreferenced|date=January 2008}} to an article creates an article message box wherever in the article you placed the template, plus it adds the category Articles lacking sources from January 2008 to the bottom of the article. To see the many such templates that you can add to articles, go to Category:Wikipedia maintenance templates.
Stub templates—templates added to very short articles—aren't maintenance templates per se, but they're similar. They similarly change the contents of an article as well as adding one or more categories at the bottom of the article. Consider, for example, the article Hulihee Palace, which includes the template {{Hawaii-struct-stub}} (see Figure 17-2).
The template {{Hawaii-struct-stub}} populated the category Hawaii building and structure stubs. That category may be of some use to readers, but its main purpose is to signal to editors that this article needs to be expanded.
Fixing category links that come from templates
[edit]Occasionally, when you want to change a category shown at the bottom of an article, you can't find that category link in the article's wikitext, even if it's a topical category that normally wouldn't come from a template. If you can't find the category link in the article's wikitext, it must be coming from a template. Finding that template, and perhaps changing it (for example, to delete the category from the article), is a five-step process:
1. Click the "edit this page" tab.
- Don't click a section edit link; click the tab at the top of the article.
2. Scroll down to the bottom of the page, where you'll see the lists of templates used for the page.
- Figure 17-3 is an example.
3. Check a template (open it in a separate window or tab), starting either at the top or with the most likely suspect.
- You'll arrive at a page with the prefix Template:, like Template:Registered Historic Places.
4. Click "edit this page" to see the wikitext of the template; see if the category in question is there. If it isn't, try the next template.
- When you do find the category, it will look just like an article wikilink: [[Category:Whatever]].
5. Usually, the problem is that the category is relevant to the template, but not to articles that the template is in. In that case, put <noinclude> in front of the category link and </noinclude> just after it.
- This code tells the software that when the template is put into an article page, the category link should not be.
When you change a category as described in these steps, the change can take days to show up in the article itself. The reason for the delay is that a given template can be located in thousands of articles. Trying to update all categories immediately could severely affect Wikipedia's servers. So the changes go into a job queue, and the software handles them little by little. Be patient.
Effective categorization
[edit]Every article should have a category, even if it's the Uncategorized pages category. That's one reason to add a stub template to an article—it puts it into one or more categories. In fact, articles usually have multiple categories, at least one of which should be the relevant category subject. If you see an article with only one category, you usually can improve things by adding more categories.
A category's relevance should be immediately apparent. For example, if an article has the category Russian architects, but there's no indication that the subject of the article is either Russian or an architect, then either the category is wrong or the article needs to be expanded.
Don't add both a category and its subcategory. For example, Golden Gate Bridge is in Category:Suspension bridges, so it should not also be in Category:Bridges. (If you think you've got a valid exception, check at the guideline Wikipedia:Categorization and subcategories—shortcut: WP:SUBCAT—to see if you're right.)
Finding the right category
[edit]The real challenge is to find the right categories to add to an article. Some suggestions:
- Go as low as possible in the hierarchy of categories. The more specific, the better. To this end, putting an article into a huge category—like People—is better than nothing, but not by very much, as Figure 17-3 shows. It's unlikely that a reader is going to say "Ah, this article is about a person. I'm really interested in reading about people—let's see what other articles Wikipedia has that are also about people."
- If you can think of a similar article (for example, for an article about a ballet star who else is or was a similar star?), check that article to see what category links appear there.
- If you can't think of a similar article, use a wikilink in the lead paragraph to get you to one. For example, if the first sentence of an article begins "Penalty methods are a certain class of algorithms to solve constraint optimization problems," you could click the link to the article Algorithm or to the article Optimization (mathematics). Once there, look at the links in the article, links to the article (at the far left, click "What links here"), and categories of the article. All of these could lead you to similar articles; the category links might even be useful as is.
- Be thorough. Think of all the different things a topic may be associated with—geographic area, a historical period, an academic subfield, a certain type of thing (like a food or an ornament), or a special interest topic. The more, the better. Just remember there needs to be some supporting text in the article. For example, the article Terracotta has links to the following category pages: Ceramic materials, Pottery, Sculpture materials, and Terracotta. That last category covers the whole topic of Terracotta—as the most significant article on the topic, the Terracotta article is at the top of the category, but there are many other pages in the category as well.
One of the best ways to find a good category for an article is to start at a higher level category and see what subcategories are available. The easiest way to do that is with the CategoryTree Special page (Figure 17-4). This special page is a window into Wikipedia's category system, starting wherever you want to.
To get to this page, look in the "toolbox" box on the left side of the screen. Click the "Special pages" link, and click Category tree. Then enter a category (for example, Australia), and click "Show tree." You can either pick a subcategory that's visible, or click a "[+]" indicator to see subcategories under any particular line.
- If you're not sure about a category, either be bold and add it, or use a higher level category that you're sure about.
- If you want to add a category to an article, and the category doesn't exist yet, don't just add the category link (which will show up as a red link). Instead, go through the process of creating (or at least considering the creating of) a new category, as described in the section about creating a category, one step of which is to search further.
- A link to a category page that doesn't exist is subject to being summarily deleted, though it may be a while before someone notices. Newly created category pages with a small number of links may be proposed for merger or deletion (see the section about renaming, merging, and deleting categories). Don't create an impromptu, temporary, spur-of-the-moment, best-guess-and-I'll-fix-it-later category; you'll just be wasting your time and the time of other editors.
- If you don't know what category to add to an article, don't worry about it. Instead of guessing at a category, use the {{uncategorized}} template to bring the article to the attention of others. Editors who love to categorize articles will find a category for it.
- Add the date parameter to the {{uncategorized}} template—for example, {{Uncategorized|date=December 2024}}. (Be careful of the parameter spelling; parameters are never capitalized. If you type Date instead of date, the software will ignore the parameter altogether.) If you don't add this parameter, a bot will do so, adding yet one more edit to Wikipedia and the history of the article. That could obscure other edits, such as vandalism, so don't skip the parameter.
Getting articles into the right place on a category page
[edit]Suppose you've added a good category to an article page, and you then look at the category page to make sure the new category is there. You find it but in the wrong place: The article is about Jane Doe, and it's in the category page's "J" section, not the "D" section where it belongs. The article is in the wrong place (as far as you're concerned) because the Wikipedia software doesn't understand anything about names of people.
You can fix this problem in one of two ways:
- You can specify, in a category link, where the title of an article is to be listed within a category page. You do this in a way that looks very much like a piped link: [[Category:Female crime victims | Doe, Jane]]. (The spaces around the "|" symbol are optional.)
- You can add something that specifies the sorting information ("sort order") for all the categories on the page, rather than doing that link by link. In this example, you just place the following directly above the listed categories in the wikitext: {{DEFAULTSORT:Doe, Jane}}.
Neither of these methods of changing where an article appears on a category page changes the name of the article. The article's name will still be Jane Doe, but it will now be listed in the "D" section, not the "J" section, of a category page. In the best of worlds, all the editors who add a category to an article will add the same sort order (in this case, last name, then first name). If they don't, you should feel free to fix the (hopefully few) category links that don't.
Category pages
[edit]As you work on adding good categories to articles, you'll encounter category pages like the one in Figure 17-1, and as a reader, you'll find them useful for getting to articles you're interested in. But there's more to category pages. They're created and managed by editors, and, like all other pages at Wikipedia, there are times when you, as an editor, can edit them to improve them. This section explains what you need to know.
Hierarchy: The categorizing of category pages
[edit]Every category page should have at least one parent—a higher-level category. (The exception, of course, is the category page at the very top of the hierarchy.) Or, to put it differently, every category page but the very highest (shown in Figure 17-5) should be within a subcategory of at least one higher-level category.
Figure 17-6 shows a category page that itself is assigned five categories.
Changing the categories assigned to a category page
[edit]Did you spot the error with the five parent categories in Figure 17-6? The problem is that Algerian culture, if you check, also has the parent category Algeria. A category page shouldn't have two parents where one parent (Algerian culture, in this case) is itself a subcategory of the other parent (Algeria, in this case). One parent category (Algerian culture) is enough, since someone looking at the higher level category (Algeria) can always find the page by just drilling down.
Fixing this categorization error is simple: Open the page Category:Media in Algeria for editing (Figure 17-7), find the line with [[Category:Algeria|Media]], and delete that. Then, following the standard procedure, add an edit summary, do a preview (categories show up at the very bottom of the page), and publish the change.
Renaming, merging, or deleting a category page
[edit]Changing a category assigned to an article or a category assigned to a category page is easy—just a quick edit. By contrast, if you want to rename a category page, you need to go through a longer process; you can't just click the "move" tab, because there is no move tab.
Renaming, merging, and deletion of pages in the Category namespace is discussed at Wikipedia:Categories for discussion (shortcut: WP:CFD). See Figure 17-8.
If you think this type of action is needed, follow the instructions on the WP:CFD page. Note that there are sections for non-controversial actions: "speedy renaming" (after a wait of 48 hours) and "speedy deletion" (for example, because a category is what Wikipedia calls "patent nonsense," defined as something "unsalvageably incoherent").
Creating a new category
[edit]If the category doesn't exist, you can create one. Whether you should create a new category, however, is another matter. While Wikipedia clearly still needs a lot more articles, it's not clear that it needs a lot more categories for those articles. So, here are some questions to consider before you create a new page:
- Will the new category have more than a few pages on it? The more pages you can put that fit the category, the more likely the category will survive. A category with just one article belonging to it is likely to have a short life.
- Is the category being added to pages that already have adequate categories assigned to them? As the guideline Wikipedia:Overcategorization (shortcut: WP:OC) says, "not every verifiable fact (or the intersection of two or more such facts) in an article requires an associated category. For lengthy articles, this could potentially result in hundreds of categories, most of which aren't particularly relevant." (The essay "Do not write articles using categories"—shortcut WP:DNWAUC—is also informative on this matter.)
- Is the category name neutral and factual? A category like Shiftless no-good politicians who should be recalled from office is hopelessly non-neutral (see WP:NPOV), not to mention unverifiable (see WP:V).
- If a category seems obvious, did you thoroughly look for it under a different name? Particularly when you're adding a category to a new or stubby article, don't just assume that if Category:People from New Zealand doesn't exist, and if it fits the article, you should create it. (See the section about finding categories for more detail on finding good categories for articles.)
If you decide to create a new category, you do that by creating a category page, exactly as you would any other page. Just type the name (for example, Category:Some new article category that Wikipedia needs) into the search box, and click Go. When the software tells you no such page exists, click the "Create the page" link, type some introductory information about the category, and publish the page.
There's one clear exception to the general rule that you should always be hesitant to create a new category: when a lot of articles (say, over a hundred) are in a non-cleanup category that has no subcategories, or are in a category when no applicable subcategories for them exist. In such a case, creating additional subcategories, and moving articles out of the category and into a subcategory by editing article pages, is a good thing to do.
Building out categories
[edit]Suppose you've found a good category for an article you're working on, and when you get to the category page, you're surprised that there aren't many more articles listed there. Consider your surprise an opportunity to improve Wikipedia. You can take up the challenge to make the category page a much better place for readers to go.
WikiProject members do this type of work all the time. They look for articles encompassed by their project, and then add WikiProject templates to article talk pages and categories to articles. You don't have to be a member of a WikiProject, however—just someone who realizes how useful categories are to both readers and editors.
There are significant advantages to working from a category page outward, looking for articles to add. Use existing articles to get clues to similar topics, both by reading the article text and following internal and external links in the articles. If you're fairly knowledgeable on the topic of a category, so much the better; you've probably got a lot of good ideas about articles to look for.
Discussing categories
[edit]Here's a puzzle that new editors often encounter: How do you mention a category on a discussion page? If you type [[Category:WhatevertheCategoryis]], you've just put the discussion page into that category, and the category name itself won't show up where you typed it. It'll show up at the bottom of the page, which isn't very helpful. Wikipedia has two different ways to display the category link where you want it: Add a colon just before the word Category, or use the {{cl}} template, as shown in Figure 17-9.
If you're looking at a category page for articles, and find talk or user or other pages listed there as well, it's worth taking a quick look at these other pages to see if you can fix the problem with a judicious insertion of a colon. Sometimes you shouldn't (for example, a draft article in user space probably isn't hurting anything if it's being worked on and already has a category), and sometimes you can't easily insert a colon (if the category is embedded in a template, for example). But often the mislisted page is just a simple mistake by an editor that can be easily fixed.
Categories, lists, and navigation templates
[edit]Categories are not the only way to provide readers with an organized approach that ties a group of articles together. Lists and navigation templates both can do the same thing. For example, Figure 17-10 is a list that essentially does the same thing as the category shown in Figure 17-1 (see the section about list articles).
You've probably seen the third option—navigation templates—but you may not be familiar with the label. Figure 17-11 shows a navigation template for winners of the Nobel Memorial Prize in Economics.
The guideline Wikipedia:Categories, lists, and navigation templates (shortcut: WP:CLN) discusses the advantages and disadvantages of each of these three ways of providing navigation among articles. It also notes that "When developers of these redundant systems compete against each other in a destructive manner, such as by nominating the work of their competitors to be deleted simply because they overlap, they are doing Wikipedia a disservice." In short, there's room on Wikipedia for editors to offer readers multiple ways to get around; no single approach is as good as a mix of all three; and editors who believe their approach is superior should direct their efforts at improving what they favor, to offer something even better to readers, rather than trying to convince other editors that their approach is inferior.
If categorizing articles intrigues you, one place to look is Category:Wikipedia category cleanup and its subcategories.
Also consider joining WikiProject Categories (shortcut: WP:CATP). And more editors are always welcome at Wikipedia:Categories for discussion (shortcut: WP:CFD).