The pipe trick uses the pipe character ("|") to save typing the label of a piped link for several kinds of wiki links. This can help avoid making an error while typing the label.
When the last character of a link is the pipe character, the pipe trick will automatically generate the text that displays for that link. It removes any part of the link title that is inside parentheses, but it also processes commas in the title, and namespace prefixes (e.g., "Help:"). The generated text is saved with the rest of the page's wiki markup.
The pipe trick does not work in change summaries, within <ref> tags, or links to sections – see below.
If the link name involves both one or more commas and a final parenthesis, only the parenthesis is suppressed:
If there are several prefixes, which can occur, for example, for an interlanguage link, only the first is suppressed:
If there are several commas, only the part up to the first comma is shown:
For the rest, if there is both an initial part and a final part that can be omitted, both are suppressed:
In some cases, the pipe trick does not work, and the link must be written out in full manually. The trick does not work when enclosing between <ref></ref> tags or <gallery></gallery> tags. It also does not work in change summaries.
The pipe trick does not work with section links, and in general it does not work for links to anchors (links that use a # sign). For example, [[Wikipedia:Verifiability#Sources|]] does not give you any wikilink.
You can achieve a similar effect for subpages by adding a slash.
Unlike the pipe trick, though, the slash trick is not expanded in the saved wiki markup.
This trick only works in namespaces where subpages are enabled.
If the title of the article you are editing includes a term in parentheses or a comma, placing a pipe at the start of a link will add that text to the end of the link target, but not display it.
For example, if the link [[|Brush]] were placed in Broom (disambiguation), the link would be expanded to [[Brush (disambiguation)|Brush]]
Placing a pipe at the start of a link to an article that has no parentheses or comma in its title will have no effect.