QUESTION:

How do I create an article that isn’t included in the regular article list?
How do I create an article that’s only displayed on the front page, and nowhere else?



ANSWER:

This is what Sticky articles are for.

The Sticky status means an article has been published, but is not included in the regular list of articles. It’s displayed only when requested with the status="sticky" attribute. For example:

<txp:article status="sticky" limit=1 />
<txp:article limit=10 />

..will display the most recent Sticky article, followed by the 10 most recent Live articles. On a section page, both tags will select articles from the current section only. On the front page, these tags will select articles from sections that have On front page? set to Yes.

To display a specific Sticky article, rather than the most recent, use the following tag:

<txp:article_custom status="sticky" id="123" />

..where 123 is the ID number of the article you want to show. You can use this to show a sticky article in a section other than the one it belongs to, or to pin a specific article to the front page of your site. The article_custom tag ignores the URL, so the selected section has no effect.

A commonly requested variation is to display an introduction on a section page (or the front page), with headlines or manually crafted links to individual article pages. For that, you can combine Sticky articles with the conditional tag method outlined in this faq:

<txp:if_article_list>
<!-- section page: display the sticky article -->
<txp:article status="sticky" limit=1 />
<txp:else />
<!-- article page: display the live article -->
<txp:article limit=1 />
</txp:if_article_list>