How to create and manage hidden categories in MediaWiki

In MediaWiki there's a special class of categories called hidden categories. What differs them from other categories is that by default they are not listed on the pages that belong to those categories, or rather they are hidden from the users. When a page is assigned to a category, that category is automatically listed on the page. The location of the links to the categories to which the page belongs depends on the skin, but usually it's at the bottom of the page. If a category is a hidden one, then it will not be listed on the pages that belong to that category.

Make a Category Hidden

The basic steps for creating a hidden category are the same as for a regular category. You can either access the URL of the non-existent category and use the options that appear to create it, or you can use the search function, or add a link on a page, then follow the link and create the category. For more details on this check the article on how to create and manage categories in MediaWiki, or the more detailed tutorial. To make a category hidden you have to edit it and add in its content __HIDDENCAT__ (there are two underscores before and after HIDDENCAT). If there are pages that already belong to that category, the links on these pages to that category will be hidden.

View and Hide Links to Hidden Categories

For registered users it's possible to view links to hidden categories. Each user can choose whether to see on pages the links to hidden categories. They can do this by editing the respective option in their account settings. To do this the user has to go to Preferences button>Appearance tab>Show hidden categories option. Of course, the option will apply only when the user is logged in. Enabling that option will make visible the links to hidden categories. There will be an explicit label in front of the link(s) that the category is hidden.

List of Hidden Categories

There's a special page that lists all hidden categories. It's visible and can be visited by all users (both registered and unregistered). One way to access it is directly to open its URL. You only have to add Category:Hidden categories to the main URL. For example, if the homepage of the site is, then you can open the page with the hidden categories with the URL categories. Another way to access the list with the hidden categories is to use the link that's available on the page that lists all categories. To access that page go to Tools menu on the left>Special pages button>List of pages section>Categories button. In case there are hidden categories, on the page that opens there will be a link Hidden categories. On the Categories page that lists all the categories there are links not only to the visible categories but also to the hidden ones.

For detailed information on creating categories read the tutorial on how to create and manage categories in MediaWiki.

Was this answer helpful?

 Print this Article

Also Read