FANDOM



A category is a software feature of MediaWiki. Categories provide automatic indexes that are useful as tables of contents. Together with links and templates they structure a project.

Putting a page into a categoryEdit

A page in any namespace can be added to a category by adding a category tag anywhere on the page, e.g.:

[[Category:Category name]]

(In the Wiki markup box below the editing box, you should see a ready-made skeleton "[[Category:]]", which will insert when you click it, so that all you have to type is the name.)

From the moment that edit is previewed or saved, there is a visible link from the "subject" page to the category page. After saving, the page will be automatically listed on the appropriate category page, which is in the "Category" namespace and therefore has a name that starts with "Category:". Pages can be included in more than one category by adding multiple category tags.

These links appear not at the location where you inserted the tag, but at the page margin in a fixed place, depending on the skin (e.g. at the bottom for Monobook, at the upper right corner for Standard and Cologne Blue). Category tags may be placed anywhere in the article, although they are typically added at or near the end of the article to avoid undesirable text display side effects. Category links are displayed in the order they occur in the article, unlike the automatic ordering of lists in the category pages themselves (see below).

Categories and subcategories; creation and editingEdit

Each of the pages in the Category namespace represents a so-called category, a kind of grouping of related pages. For example, this page belongs to "Category:Glossary", which contains definitions of technical terms. That category in turn is a subcategory of a "higher" broader category. The chain should go right up to our top category.

Individual wikis generally have their own top-level categories, such as w:Category:Browse in Central Wikia and many individual Wikia. For categories in Meta-Wiki, see m:Meta:Categories.

When a page belongs to any categories, their names appear near the bottom of that page (or in the upper-right corner, depending on the skin being used).

The category page contains text that can be edited, like any other page; but the last part of what is displayed is an automatically generated, alphabetical list of links to all pages in that category (with their initial characters as markers). The order is in fact ASCII order, meaning that most punctuation marks and numerals precede all unaccented capital letters, which precede unaccented lower-case letters, which precede accented letters; see Help:Special page.

New categories can be created and edited in the same ways as any other regular page. However, as noted above, unless the category is empty the displayed page contains more than what was in the edit box.

For a complete list of categories, see Special:Categories. It is so big on this wiki that its uses are rather limited! There are quicker ways of finding a particular category. See the talk page for some discussion.

In order to reference a category within a page as a normal wiki link (without adding the page to the category), prefix the link name with a colon. For example: [[:Category:Not in this category]].

Category pageEdit

A category page consists of any or all of the following:

  • editable text
  • list of subcategories; how many there are is also displayed; if there are no subcategories the header and count are not shown. With CategoryTree extension, installed on Wikimedia, one can click "+" to see the subcategories of a selected subcategory.
  • list of pages in the category, excluding subcategories and images; the number of items in this list is called the number of articles; if there are none the header is shown anyway, and "There are 0 articles in this category."
    • (From MediaWiki 1.5 onwards, the namespace prefix is no longer shown.)
  • list of images with thumbnails (how many there are is not counted); the first 20 characters of the image name are shown, with an ellipsis if that is not the full name; also the file size is shown. As opposed to the second and third section, this section does not have subheaders per letter, it has not even a header itself and visually seems to fall under the header of the previous section "Articles in category ...", even though in counting the articles, images/image pages are not considered articles).

The items in the lists all link to the pages concerned; in the case of the images this applies both to the image itself and to the text below it (the name of the image).

The first and second list each have a header for each first character, dispensed with if there are no entries for a header. If no headers are desired, use sortkeys all starting with a blank space (see also below).

On Meta and Wikipedia a redirect to a category shows the editable text only. To get the full page after being redirected, use the link "Image", or "Category", respectively.

On Commons a redirect to a category gives the full page, but not the subcategories and pages in the redirect page (if that is also a category).

Length of editable textEdit

The main purpose of a category is to display the automatically updated and alphanumerically listed sets of related subsidiary subcategories, articles, and media. People looking at the page should be able to see at least the first of the subcategories without scrolling, no matter what height their screen display, menu bars, etc. Therefore, any introductory textual section that is more than a screenful for any viewer is too long. Cut shorter and link to a main article using Template:Catmore.

Creating a category page Edit

To create a category page, one can, e.g:

  • follow an automatically created link to the category page

or:

  • add a colon in front of the Category tag when you set up the page-creation link, to prevent the software from thinking you merely want to add the page you are working from to the category:
[[:Category:Category name]]

Placing the above text on a working page will create the link you can use to edit your category page.

Sort orderEdit

The system uses alphabetical order, or more precisely Unicode order, for pages in categories. The range 32–127 corresponds to ASCII; for more, see a table of Unicode characters:

 !"#$%&'()*+,-./0123456789:;<=>?
@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_
'abcdefghijklmnopqrstuvwxyz{|}~

Note in particular that "Z" comes before "a", and "z" before accented / umlauted characters. The blank space within a page name is treated as an underscore, and therefore comes after the capitals, and before the lower case letters. Thus we have the order PC, PCX, PC Bruno, PCjr. However, a "blank space" after the name comes before any character.

See also special characters, Pages starting with a special character, collating.

Sort key Edit

Each of the three lists is in the order explained above. If you want an item in a list to be positioned in that order, based on an alternative name (sort key) for that item, then this can be specified in the category tag that places the item in the list:

[[Category:category name|sort key]]

For example to add an article called Albert Einstein to the category "people" and have the article sorted by "Einstein, Albert". You would type "[[Category:People|Einstein, Albert]]".

Although this is like the syntax for a piped link (and in an edit summary it is interpreted like one), there is a clear difference: the second term in the piped link is an alternative term for the first one, while the sort key is an alternative name for the page in which the tag occurs. Also, a piped link influences the rendering of the page itself, while a sort key affects the rendering of another page.

The displayed name is not changed, and is unfortunately visible only on the edit pages of the members of the category.

An explanation of the sort key system used can be useful on the editable part of a category page.

The sort key system should be obvious, otherwise the order seems random and items are hard to find. The system should either be consistently applied to all members of a category, or be such that the listings of members on which it is applied fit in well within the list of members for which no sort key is used. The latter is advisable for large, growing categories with many contributors. See also below.

A common system is starting with the last name, then a comma and a space, and then the first name; note that any additions such as "Jr." should come at the end, otherwise the entry would come before the same without the addition, because a space comes before a comma.

In e.g. Wikipedia:Category:Denmark, the sort key of a page consists of the keywords, without "Danish" or "of Denmark", "in Denmark", etc.

The sort key is case sensitive, so a page with the tag [[Category:Foo|Zealand]] is sorted before one with the tag [[Category:Foo|amsterdam]]. This can be inconvenient, requiring a sortkey in projects with case-sensitivity of the first character if one wants the A and the a together, but it may also be used to one's advantage: e.g., it allows sorting of the pages into two groups, one put in the range A-Z and one in a-z, using sortkeys; see e.g. Wikipedia:Category:Demo, where the help pages are put separately by using sortkeys with lower-case "h".

To get the order right, be consistent in punctuation and spacing. For example, "A Z" with two blank spaces comes before "A A" with one. (Unlike double spacing in text, the double space is treated as is.)

An underscore in a page name is equivalent with, and treated as, a blank space. However, an underscore in a sort key is distinct from a blank space.

As seen from the ASCII sequence above, forcing items to the beginning or end can be done with a sort key starting with a space or ~, respectively. Another common sort key for the beginning of the list is the asterisk (*). Careful use of space and asterisk can produce two or more groups collected before "A".

Default sort key Edit

[MW1.10+] It is possible to set a default sort key which is different from {{PAGENAME}} by using the magic word {{DEFAULTSORT}} thus:

{{DEFAULTSORT:new key}}

Once this has been included in an article, the new default sort key will remain in force until the end of the article, or until a fresh {{DEFAULTSORT}} is used.

Sort key of imagesEdit

Images without sort key are alphabetized according the full name, including namespace prefix "Image:". Therefore, for images for which a sort key is used, the prefix should also be included, otherwise these images are positioned on the category page before "Image:A" or after "Image:Z". Alternatively, all images can be given a sort key.

Thus a list of images may show a sequence A-I, A-Z, I-Z. One may choose to fix the first and third sequence by adding the prefix to the sort keys, or the second sequence, by putting sort keys without prefix.

Similar remarks apply for other non-main namespaces. However, the category namespace is an exception: the default sort key is without prefix, to avoid listing all subcategories by default under the C. Therefore, explicit sort keys should also be without prefix.

Grouping of pages by using sortkeysEdit

If e.g. in a list of people sortkeys like "scientist Einstein, Albert" are used then all scientists are listed together under the "s". Unfortunately no separate heading "scientist(s)" is possible, and salesmen would be under the same heading. Alternatively "scientist" can have e.g. code K (to be explained in the editable part of the category page) and the sortkey "K Einstein, Albert" is used.

Labels in the list of imagesEdit

As mentioned above, the first 20 characters of the image name are shown, with dots if that is not the full name. This can be inconvenient, e.g. in commons:Category:William-Adolphe Bouguereau most images have a name starting with "William-Adolphe Bouguereau (1825-1905) -", which are therefore all labeled "William-Adolphe Boug..." (see the last section of the category page).

The full names are only shown in the hover box and the status bar, depending on the browser; in the latter possibly with codes such as "%28" for "(".

Thus, looking up a name in the alphabetic list is cumbersome. It might have been better to start the names with the shorter "Bouguereau, " and then the title of the painting (unless the software will be improved later).

Using templates to populate categoriesEdit

If a template contains the code indicating that it is in a category, this puts not only that template in the category, but also the pages that include the template.

The page that contains the template correctly lists the categories to which it belongs. However, adding or deleting a category tag in the template does not add or delete the listings on the category page of pages that use the template, until some edit is made in the page that uses the template.

In other words:

  • lists of categories a page is in, are up-to-date
  • lists of pages in a category are based on the situation just after the last edit of the pages

Since adding or removing a category or template tag is obviously an edit, there is only a complication when a page is indirectly added to or deleted from a category, through a change in a template the page uses.

To refresh category pages with respect to the listing of a particular page (adding or deleting the entry), a null edit can be applied to that page: just applying section edit and saving without changes.

Sort keyEdit

A sort key in a category tag in a template applies to the template as well as to the pages that use it, so it is only useful if it is variable. It can depend on a variable (notably PAGENAME), parameter, or the content of a template.

Categorizing templates themselvesEdit

To categorize templates themselves, without the pages that call them, one can use the <noinclude> tag, for example
<noinclude>[[Category:category name]]</noinclude>

Alternatively one can use e.g. {{#ifeq:{{FULLPAGENAME}}|Template:Editthispage|[[Category:category name|{{PAGENAME}}]]|}}

Excluding templates from categoriesEdit

Use:
<includeonly>
to keep a template from showing up in a category. Text between
<includeonly>
and
</includeonly>
will be processed and displayed only when the page is being included. The obvious application is:
  • Adding all pages containing a given template to a category

Note that the usual update problems apply -- if you change the categories inside a template, the categories of the referring pages won't be updated until those pages are edited.

Comparison with "What links here"Edit

Backlinks are often used as a by-product of links and inclusions. However, links and inclusion tags can be put specially for the backlinks, just as category tags are.

Thus one can create a kind of "category abc" showing its content with Special:Whatlinkshere/abc without an entry in the category lists on each page in the category. With inclusion this can be done in two ways:

  • {{#if:|{{:abc}}}} rendering nothing. This works regardless of whether abc exists.
  • {{:abc}}. This requires creating a blank page to render nothing, or a page with some content to provide an in-page category listing.

In the case of links:

A redirect corresponds to a supercategory.

Advantages of categories:

  • Category listings are alphabetical; for "What links here", alpha order typically applies for the first part only, for the pages already linking to the given page at the time of the last rebuilding of the link tables in the database.
  • Categories have an editable part (however, there is anyway a talk page)
  • A category can have multiple supercategories

Advantage of a pseudo-category system using backlinks:

  • Backlinks can show a tree structure: not only pages and subcategories, but also:
    • the contents of the subcategories (for each a list of pages and a list of sub-subcategories) and
    • the contents of the sub-subcategories (for each a list of pages and a list of sub-sub-subcategories),

but not the contents of the sub-sub-subcategories (only up to three levels are shown); see Cat:Help and Cat:Municipalities of the Netherlands.

In the case of inclusions:

  • also multiple supercategories are possible
  • combined content of subcategories is shown in one list, not grouped by subcategory (the tree structure is not shown, but it can be used by taking the backlinks at a lower node, showing the smaller set)
  • the restriction of three levels (in the case of using redirects) does not apply; for example page Aijkl in the category Aijk in the category Aij in the category Ai in the category A (represented by Aijkl calling template Aijk, etc.) can be shown in the list of pages in category A (the backlinks of template A).

"What links here" tends to be a by-product of links that are useful anyway (although links may be put with this use in mind), while category links are put specially to produce a category page.

Putting a category tag on a test page, user page, etc. (also if done indirectly by including a template with a category tag) is considered to pollute the category (unless the category is specifically for material not in the main namespace), while regular links from such pages showing up in "what links here" are considered harmless.

Therefore:

  • when copying text to such pages, remove category tags; alternatively, convert the category to a link by adding a leading colon after the brackets. For example, "[[:Category:Art]]" is a link to the category, not an assignment to a category.
  • when including a template that is in a category, do not use the template feature, but use "subst" or copy-and-paste, and delete the category tags.

Applying "Related Changes" to a categoryEdit

For the "What links here" feature, only the links in the editable part of the page count, not the links to the pages in the category.

For a category, the "Related Changes" feature gives the changes in the pages in the category (according to the current category page, so excluding the pages that have potentially been added and including those that have potentially been removed, through addition or deletion of a template to/from the category, as explained above)

  • for subcategories: the changes in their editable parts only
  • for images (image pages): the changes in their editable parts only.

It does not show the changes in pages linked from the editable parts of the category. Possible workarounds:

  • The editable part can be put in a template. The category tags (which have no effect on Related Changes anyway) can better be kept out of the template, because on the pages of these supercategories the template would be listed under the articles in those categories. Whether interwiki links (with or without interlanguage link feature) are in the template or not does not make a difference, provided that the template is not used elsewhere.
  • Related Changes is applied to a page that calls the category as a template: {{:Category:Category name}}; only the editable part is included in the page; the page could be specially created for this purpose and call multiple categories. However, this page will then be listed in the supercategory pages of each category.

As usual (but as opposed to a watchlist) the changes in the corresponding talk pages are not shown.

Applying "Related Changes" to a category, with sufficiently high limits on number and days, is also useful for checking which pages in a category one "watches": they are bolded.

Dynamic page listEdit

The DynamicPageList2 extension provides a list of last edits to the pages in a category, or optionally, just the list of pages; the simpler DynamicPageList is installed on Meta and Wikinews; the version DPLforum is installed on Wikia, see http://www.wikia.com/wiki/Help:Forums .

Detection of additions to a categoryEdit

With "Related Changes" one can find pages which are newly in a category due to addition of a category tag or the tag of a template that is in the category. Addition of pages through addition to the category of a template is seen indirectly: one can see the change in the template, and then check which pages call the template. This even shows pages which are only potentially in the category (see above).

Unfortunately there is no similar way to detect a deletion from a category.

Category considerationsEdit

Each page is typically in at least one category. It may be in more, but it may be wise not to put a page in a category and also in a more general category.

Each category, except the top-level category, is typically in at least one higher-level category. It may be in more; for example, a category (or article) named "Ohio counties" can be in "Category:Ohio" and "Category:Counties".

Check the conventions in a project and gain some familiarity with the categories in use before assigning pages and subcategories to categories and before creating new categories. See discussion at Help_talk:Category, particularly Help_talk:Category#How_to_find_the_best_one_if_it_exists, for some guidance.

Linking to a category Edit

A colon (":") before the "Category" prefix, e.g., [[:Category:NameOfCategory]], will allow you to include a link to a category page without actually adding the article to that category.

Alternatives for overviewsEdit

An overview of links to pages and of images (by means of thumbnails) can be put in the editable part of a category, just as in any page, or be generated in the second, third, and fourth parts of the category page.

  • Putting it in the editable part gives control of structure and layout. For example, in the editable part of commons:Category:William-Adolphe Bouguereau the name of the painter does not have to be repeated, and the full titles of the paintings can be shown.
  • Using the second, third, and fourth parts is more convenient for new pages/images: adding the category tag (which for images can even be done in the upload summary) automatically updates the overview. Also, the sorting in alphabetic order is automatic in those parts.

A category page may have an overview in the first part, as well as in one or more of the other parts, with the following possibilities:

  • items occur twice, but ordered and structured differently, with different info (including that the fourth section shows the file sizes); when creating/uploading new items, they can be put in the category first, which is a convenient intermediate stage for updating the editable part
  • avoiding duplications

Anyway, a category has the double functionality of allowing extension of the overviews both from the overview page and from the member pages. This convenience makes it easier to build and maintain a complete overview (albeit divided over sections) for the subject concerned.

If the second, third, and fourth part of the category page are not used, then the category page is much like a page in another namespace. Differences are:

  • the name starts with "Category:"
  • in ordinary links to the category page, the name must be preceded by a colon
  • Related Changes does not work for the editable part

If a category is growing too large, it is cumbersome to split. When new items need to be added, and they are on a subtopic about which there is still little in the category, this is a good occasion to start a subcategory. Other kinds of overview can be split more easily.

See also commons:Commons:Images on normal pages or categories:Vote.

Subcategories Edit

Creating subcategories takes only a few additional steps. Adding a category tag to a category page makes the edited category a subcategory of the category specified in the tag.

If a new item is being added (as mentioned above), tag it with the new [sub]category name then tag that subcategory with the parent category name. Or edit one of the existing items in the same way.

The slightly longer alternative is necessary if there are no items immediately available to go into the new subcategory. First create a new category page for the subcategory the same way you would make a regular category. For example, create [[Category:Soccer]]. Then go to the newly created category page and edit it. Add the category tag for the parent category (e.g. [[Category:Sports]]) to the page.

In this example, the Soccer category would then be a subcategory of the Sports category.

For a live example, see Category:Demo_1 which is a subcategory of Wikipedia:Category:Demo.

Moving a category pageEdit

The only way to move/rename a category page is to manually change all category tags that link to the category, and copy the editable part. There is no automatic way to move a category page in the way one moves an article page, although there are ways to do it by tinkering with the underlying software, which very few users can access.

The editable first part of a category can be moved like any other page, but that won't move the subcategories, articles, and images in the second, third, and fourth parts (see above). For categories entirely populated by templates (see above), however, modifying the templates allows one to move all affected articles to a renamed category.

Redirecting a category page is possible, but almost certainly won't have the desired effect (it can be abused for other purposes). In case other users try to re-create the category, leave the category in place but with Template:Category redirect on it - that directs users to where the page or subcategory should be.

List of all categoriesEdit

Special:Categories provides an alphabetic list of all categories, with the number of members of each; this number does not include the content of the subcategories, but it includes the subcategories themselves, i.e., each counting as one. Comparing with http://meta.wikimedia.org/w/index.php?title=Special%3AAllpages&namespace=14 :

  • a category without members is not in the former
  • a category that has not been created as a page is not in the latter (in the former it stands out as a red link)

Singular or pluralEdit

It is not obvious whether a page like Amsterdam should be in category City (a description of a member of the category) or Cities (a description of the category as a set of pages). A convention for using one or the other is useful (e.g. on Wikipedia), to avoid ending up with both, with part of the applicable pages in one, and part in the other. A convenient rule of thumb is: if you can count some of the subject-matter, make the name plural.

Category flatteningEdit

Category flattening is displaying also the articles in a category's subcategories, sub-subcategories, etc.

See also m:Category flatten, and [1].

Category intersection and in-page displayEdit

Various MediaWiki extensions allow intersection of categories, and more:

They all also allow further restriction to a namespace; some allow also restriction to a union of namespaces, or the complement of a union of namespaces.

They all allow the info to be displayed in any page, not just a separate category page.

See also:

Category unionEdit

Various MediaWiki extensions allow union of categories, and more:

See also above.

Display of info about the pages in a categoryEdit

Various MediaWiki extensions allow display of info about the pages in a category, and more:

See also above.

In-page display of categories a page is inEdit


This page uses Creative Commons Licensed content from Wikipedia (view authors). Smallwikipedialogo
CategoriesUnfurled

Categories seen at the top of the page, including a view of the drop-down when you click on "more"

A category is a navigational tool used in MediaWiki to group similar pages together and structure the wiki, making it easier to explore and use. They can be used to group not only articles, but also templates, images, and even users.

Categories can be found in the article header and at the bottom of the page.

Why are categories important?

Categories are the basic tool for structuring wikis: They help organize the content, navigate the pages, and find related content. Ideally, every wiki page should be in at least one category.

Categories themselves can be categorized within other categories, allowing you to create a category tree of interlinked categories that make exploring the wiki much easier.

For example: A reader browses through a TV series wiki and opens a page on Jessica Protagonist. She is categorized as one of the Main characters. The reader can open that category and then move up to the higher level Characters category to explore Minor characters or Characters by season. The Characters category acts as the trunk of the category tree from which other categories branch off. Without the category, the reader would have to know the specific name of a character to find an article about them.

There is another reason for using categories: Categorization is essential for several core features of Fandom wikis, including:

  • The mobile main page, which uses categories as building blocks.
  • DynamicPageList, which generates lists based on categories.
  • The "Related Pages" module, which displays pages based on their categories.
  • Many bot usages.

Without categories, they simply won't work.

How to add a category?

To add a category, begin by going to the page you wish to categorize. Then use either the category module at the bottom of the page or an editor, to add your category.

Using the category module

CategorySelect suggest

Adding a category via the category module. Note how existing categories are suggested to you.

The category module, if enabled, allows you to add categories without opening the editor. Simply scroll down to the bottom of a page and:

  • Click on the Add category button, and start typing in a category name.
  • You can use an already-established category (suggestions will appear as you type) or add a new one.
  • Once you are done, hit save and the category will appear on the article.

If you don't use the module, you can disable it through the preferences page. Just click on the Editing tab, check the box next to Disable Category module and then save your preferences.

While editing

There are various ways to add categories while editing the wiki, depending on which editor you use.

UCP editor

UCP editor categorization

The UCP editor interface.

The new Unified Community Platform editor allows for switching between Source Editing and Visual Editing.

  • In Source Editing mode, you simply add the category link to the article: [[Category:Help]] will add a page to the Help category.
  • In Visual Editing mode, you can click on the Categories button in the drop-down menu on the right. This opens the category dialogue, which allows you to edit categories, add new ones, and optionally customize how the article should be sorted.

To commit changes, simply save the page.

Legacy VisualEditor

VECatLocation

In VisualEditor, first find the dropdown menu in the upper right

VECatSuggest

In the VisualEditor, these are some of the categories that are suggested on a page about Rey from Star Wars.

In the legacy VisualEditor:

  • Click on the dropdown menu to the left of the Cancel button, scroll down, and click on Categories.
  • In the dialogue box, enter a category into the top field. Existing categories will show up as you type in more letters and can be selected by clicking on them.
  • To change how the page is sorted in a category, use the second field. By default, the page is listed exactly as its name is written, but you might want to sort them in a different manner.
For example, Charlie Brown can be sorted as Brown, Charlie by using that second box.
  • When finished, click on Apply changes and Save page to complete the categorization.


Legacy rich-text editor

Adding category edit mode

Adding, removing or editing a category from the editor

On the right-hand side of the editor is a Categories module. Click to expand this and you will see a list of the categories already present.

  • To add a category, type the category name in the input area above the existing categories. As you type, you will see suggestions appear.
  • Click on the pencil next to each category to edit that category's settings.
  • Click on the trash can to remove the category.

Legacy source editor

While in source, you can add the category name as a link to the bottom of the page itself (e.g. [[Category:Help]]), or use the category module in the right rail.

By default, existing categories appear in the category module in the right rail. However, if you choose to disable the category module in your preferences, they do appear at the very bottom of the page.

How to sort articles in categories?

  • When clicking the edit icon next to category names, you can define a "sortkey" for that category. This sortkey defines at what point the article appears in a category page's listings, e.g., sort a first last name page under last name.
For example, you can use [[Category:Help]] to add a page to the Help category. To customize the sorting, you can use [[Category:Help|Custom name]] or [[Category:Help| ]] to force the article to display at the top of the page.
  • If an article example is an introduction for category example, a blank (space) or * (asterisk) sortkey puts it near the beginning of the category.
  • If the article is in many categories, you can add {{DEFAULTSORT:<sort key>}} in the article while editing in source mode to sort the article in all the categories the same way. This will save you from having to edit each category's parameters individually.

How to use category pages?

Categorical Pseudo-existence

When pages are in a category that hasn't been fully created

As soon as you add a category to a page, that category will appear in Special:Categories. You can reach the category page by clicking on the category link, or by entering the address into your browser.

However, the category page still needs to be created in order to be a part of the category tree, be available for selection on the Mobile Main Page, and be suggested when editing.

To do this, you need to create the category page.

Creating a category page

You can either create categories in advance, by starting a new page under the desired category name (Category:Target name) in any of our editors, or by adding the category to a page and then clicking on the category link or using Special:WantedCategories.

Category pages are created like any other page on a wiki and categorized in the same fashion.

For example, if your wiki is about the Marvel Universe, and you're starting a category about female heroes in the Marvel Cinematic Universe (aka Earth-199999), you can create the category Female superheroes (Earth-199999) in this manner:
Female superheroes of Earth-199999 came from every part of that Earth, exhibiting a wide range of powers, both meta—human and mortal. This category collects pages on this wiki about them, as well as many images and videos featuring their exploits. [[Category:Earth-19999]]

Once published, the category will appear under Earth-19999 and become available in the category module, all bots, DynamicPageList, the Help:Mobile Main Page, and other features.

Note that a category description isn't essential. However, a brief summary will always benefit your wiki's SEO, as it will be displayed in search results.

Deleting a category

Categories can be deleted like any other page, from the Edit menu drop-down panel. However, keep in mind that deleting a page does not remove it from pages contained within it. You have to delete them manually, either before or after deleting the category.

As long as a single page remains in the category, it will be listed on Special:WantedCategories.

What's the category page layout?

There are several ways a category can be displayed. Anonymous or logged-out users will only be shown the dynamic, default category layout, while registered users can switch between them and select a default one.

You can change your preferred layout through the preferences page:

  • Open the My Info tab.
  • Scroll down to the Appearance section.
  • Use the drop-down next to Category page layout to select your preferred layout.
  • Save your preference changes.

You can also switch between layout options by using the layout buttons in the top-right corner of the page.

Note that the category display options do not affect the contents of the category page itself, they only affect how pages listed in the category are depicted. The category's contents (description, images, etc.) will always display first.

Dynamic categories

This is the default layout for anonymous and logged-out users.

The first section is an image gallery similar to the one used by the classic categories layout. Although similar in layout, the galleries may feature different pages due to a difference in selection criteria. The gallery for dynamic categories cannot be disabled.

The second section contains a count of the total number of list items and a list of up to 200 items. The list contains both subcategories and pages sorted alphabetically by sortkey. The list is organized into two columns and, where possible, each item contains an image from its respective page. Above the list is a series of links that allow the viewer to skip to a specific letter in the alphabet. Below the list, next and previous buttons are displayed.

Classic categories

The first section is an image gallery featuring up to eight of the most popular pages from the category. The images are arranged in rows with as many as four images per row. Each image serves as a link to its respective page.

The second section is a list of subcategories and the third section is a list of pages. The layout of the lists is similar to each other. If a list has no items to display, its section is not displayed. The sections contain a count of the total number of list items and a list of up to 200 items.

If there are more than 200 items in the list, links to view the next/previous items will be placed both above and below the list. The list is organized into as many as three columns and sorted alphabetically by sortkey. If the CategoryTree extension is enabled (it should be by default), the subcategory list will display each item as a category tree instead of a link to the category page.

Category gallery

By default, all categories on legacy wikis have a Category Gallery at the top of the category page itself. This shows a small image and link for each of the 8 most popular pages in that category. The image shown is usually the first image on each page.

  • If a page has no suitable graphics, then the first few lines of text will appear. Suitable images must be:
    • Larger than 130px by 115px
    • Used ten or fewer times on the wiki in content namespaces
    • Not an SVG
  • If you have a community where this display does not work well, you can add the expression __NOCATEGORYGALLERY__ to the top of the page to remove it. You can also request that it be disabled on all pages through Special:Contact.

Category exhibition

CatExhibitionSample

A category with Category Exhibition enabled.

Category Exhibition is an optional display method for category pages available on legacy wikis. It can be turned on in your account preferences.

  • In the exhibition image mode, every page in the category is displayed as an image with a link. Images can be displayed in alphabetical or most visited order.
  • A small toggle option on the upper right of the page allows users to choose a "list" (lines) or image (squares) view.
  • In list mode, the category gallery appears above an alphabetical listing of all pages in the category.

Further reading

Further help and feedback

Community content is available under CC-BY-SA unless otherwise noted.