Sometimes I want to make a post "sticky" so it stays at the top of my entry list for an extended length of time, even after posting newer entries. There are several ways to accomplish this.
One, perhaps the simplest, is to post-date the "sticky" entry so that it will stay in place as long as that date is still in the future or no entry has usurped it's place by post date.
Another option is to just hard-code the sticky text into your index template where you want it. (yuck, but it works)
A third option and my preferred method is to use the MTEntry plugin which gives you the MTEntry tag, allowing you to call one specific entry id...
Place your code above the regular MTEntries code. You can see on my main index that I have also created a div named sticky and, in my stylesheet, styled it with a border and alternate background color. If a sticky post is not currently displayed on my main index, see this screenshot to see the styling I use. Here's one way to code this:
Last, but not least, is to create a category called "sticky" or "announcements" and insert the MTEntries code calling only that category into your main index template above your normal MTEntries code. Your announcement entries can be categorized accordingly and, voila!, your most recent post from that category will remain in place until a new announcement replaces it.
CODE SAMPLE:
If you do not want your "sticky" post to be duplicated in your regular entries, you can use the CatEntries plugin which allows you to include or exclude specific categories from your entries. Use this in your regular MTEntries tag:
