The display name of the page in Mediawiki can be changed using the magic word:


But the list of pages on the category page displays the original name (without the underscore in my example).

Is there a way to display a custom name in this list?

  • 1
    Possible duplicate of the following unanswered question. I am not aware of any way to do this. webmasters.stackexchange.com/questions/38842/…
    – Asahiko
    Commented Aug 12, 2013 at 18:27
  • Is there a reason you don't want to simply rename the page via 'Move' or request that an administrator do so?
    – user33745
    Commented Nov 15, 2013 at 3:09
  • @denmch, it is impossible to assign a name with underscores, as in my example
    – jurijcz
    Commented Dec 25, 2013 at 8:00

3 Answers 3


Titles with underscores are not allowed in MediaWiki. Per https://www.mediawiki.org/wiki/Manual:Page_title:

The following are not valid as page titles: [...]

  • Titles containing the characters # < > [ ] | { } _ (which have special meanings in Wiki syntax)

Categories display titles as stored in the database. DISPLAYTITLE only affects the header element, not the article's title, shown in the URL. This is a problem for Wikipedia articles with lowercase first letters, such as iPod and pH, which have to appear in categories with the initial capital.

Removing the underscore from $wgLegalTitleChars may allow you to have underscores in the title, but IMHO it's not worth the hassle for a small cosmetic change.


The other answers are incorrect. What you request is not yet possible, though it's a long-standing feature request that will probably be solved eventually.


IIR, you can add the index entry as an additional parameter in the category link; e.g., consider a page "Donald Duck":

[[Category: Ducks]]
[[Category: Ducks by lastname|Duck, Donald]]

In the category "Ducks", it would be listed as "Donald Duck", while in "Ducks by lastname" it would be "Duck, Donald".

  • but what about displaying a custom name in list of pages in category as has been asked for?
    – jurijcz
    Commented Dec 25, 2013 at 7:57
  • Like I wrote: add it as an argument to the category link. Note that entries which start with lowercase letters may be listed separately (not together with their captalized siblings; ASCII sorting).
    – Tobias
    Commented Jan 6, 2014 at 8:32
  • unfortunately, it didn't work for me. In category Ducks by lastname displays a link to Donald Duck(not Duck, Donald) page. MW version is 1.22.0. As I understand, the name after the pipe - only for sorting, not for displaying.
    – jurijcz
    Commented Jan 6, 2014 at 9:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.