Codex

Interested in functions, hooks, classes, or methods? Check out the new WordPress Code Reference!

Template:Main

Main article{{#if:|s}}: [[{{{1}}}|{{{1}}}]]{{#if:
|{{#if:|, | and }}[[{{{2}}}|{{{2}}}]]}}{{#if:
|{{#if:|, |, and }}[[{{{3}}}|{{{3}}}]]}}{{#if:
|{{#if:|, |, and }}[[{{{4}}}|{{{4}}}]]}}{{#if:
|{{#if:|, |, and }}[[{{{5}}}|{{{5}}}]]}}{{#if:
|{{#if:|, |, and }}[[{{{6}}}|{{{6}}}]]}}{{#if:
|{{#if:|, |, and }}[[{{{7}}}|{{{7}}}]]}}{{#if:
|{{#if:|, |, and }}[[{{{8}}}|{{{8}}}]]}}{{#if:
|{{#if:|, |, and }}[[{{{9}}}|{{{9}}}]]}}{{#if:
|, and [[{{{10}}}|{{{10}}}]]}}{{#if: | (too many parameters in {{main}})}}

Usage

When articles become too large, subarticles are usually created. This template is used to mark the section of the "Main" article that was separated to add a link to the new article. It should not be used at the top of an article to link to its parent topic. Such links should be a natural part of the article lead.

Usage

{{main |Article 1 }}

You may also include additional links, up to ten in total:

{{main |Article 1 |Article 2 |Article 3 |Article 4 |Article 5 |Article 6 |Article 7 |Article 8 |Article 9 |Article 10 }}

For each link, you may optionally specify a link appearance (this is mostly intended for articles whose titles suffer from technical limitations):

{{main |Article 1 |Article 2 |Article 3 |Article 4 |Article 5 |Article 6 |Article 7 |Article 8 |Article 9 |Article 10 |l1=Article 1 link appearance |l2=Article 2 link appearance |l3=Article 3 link appearance |l4=Article 4 link appearance |l5=Article 5 link appearance |l6=Article 6 link appearance |l7=Article 7 link appearance |l8=Article 8 link appearance |l9=Article 9 link appearance |l10=Article 10 link appearance }}

Example

Code Result
{{Main|Article}} s}}: Article{{#if: , | and }}[[{{{2}}}|{{{2}}}]]}}{{#if: , |, and }}[[{{{3}}}|{{{3}}}]]}}{{#if: , |, and }}[[{{{4}}}|{{{4}}}]]}}{{#if: , |, and }}[[{{{5}}}|{{{5}}}]]}}{{#if: , |, and }}[[{{{6}}}|{{{6}}}]]}}{{#if: , |, and }}[[{{{7}}}|{{{7}}}]]}}{{#if: , |, and }}[[{{{8}}}|{{{8}}}]]}}{{#if: , |, and }}[[{{{9}}}|{{{9}}}]]}}{{#if: , and [[{{{10}}}|{{{10}}}]]}}{{#if: | (too many parameters in {{main}})}}
{{Main|Article 1|Article 2|Article 3}} s}}: Article 1{{#if:Article 2 , | and }}Article 2}}{{#if:Article 3 , |, and }}Article 3}}{{#if: , |, and }}[[{{{4}}}|{{{4}}}]]}}{{#if: , |, and }}[[{{{5}}}|{{{5}}}]]}}{{#if: , |, and }}[[{{{6}}}|{{{6}}}]]}}{{#if: , |, and }}[[{{{7}}}|{{{7}}}]]}}{{#if: , |, and }}[[{{{8}}}|{{{8}}}]]}}{{#if: , |, and }}[[{{{9}}}|{{{9}}}]]}}{{#if: , and [[{{{10}}}|{{{10}}}]]}}{{#if: | (too many parameters in {{main}})}}
{{Main|Article 1|Article 2|Article 3|Article 4|Article 5}} s}}: Article 1{{#if:Article 2 , | and }}Article 2}}{{#if:Article 3 , |, and }}Article 3}}{{#if:Article 4 , |, and }}Article 4}}{{#if:Article 5 , |, and }}Article 5}}{{#if: , |, and }}[[{{{6}}}|{{{6}}}]]}}{{#if: , |, and }}[[{{{7}}}|{{{7}}}]]}}{{#if: , |, and }}[[{{{8}}}|{{{8}}}]]}}{{#if: , |, and }}[[{{{9}}}|{{{9}}}]]}}{{#if: , and [[{{{10}}}|{{{10}}}]]}}{{#if: | (too many parameters in {{main}})}}
{{Main|Article|l1=Alternate title}} s}}: Alternate title{{#if: , | and }}[[{{{2}}}|{{{2}}}]]}}{{#if: , |, and }}[[{{{3}}}|{{{3}}}]]}}{{#if: , |, and }}[[{{{4}}}|{{{4}}}]]}}{{#if: , |, and }}[[{{{5}}}|{{{5}}}]]}}{{#if: , |, and }}[[{{{6}}}|{{{6}}}]]}}{{#if: , |, and }}[[{{{7}}}|{{{7}}}]]}}{{#if: , |, and }}[[{{{8}}}|{{{8}}}]]}}{{#if: , |, and }}[[{{{9}}}|{{{9}}}]]}}{{#if: , and [[{{{10}}}|{{{10}}}]]}}{{#if: | (too many parameters in {{main}})}}
{{Main|(15760) 1992 QB1|l1=Joe's Crab Shack}} s}}: Joe's Crab Shack{{#if: , | and }}[[{{{2}}}|{{{2}}}]]}}{{#if: , |, and }}[[{{{3}}}|{{{3}}}]]}}{{#if: , |, and }}[[{{{4}}}|{{{4}}}]]}}{{#if: , |, and }}[[{{{5}}}|{{{5}}}]]}}{{#if: , |, and }}[[{{{6}}}|{{{6}}}]]}}{{#if: , |, and }}[[{{{7}}}|{{{7}}}]]}}{{#if: , |, and }}[[{{{8}}}|{{{8}}}]]}}{{#if: , |, and }}[[{{{9}}}|{{{9}}}]]}}{{#if: , and [[{{{10}}}|{{{10}}}]]}}{{#if: | (too many parameters in {{main}})}}