• Skip to primary navigation
  • Skip to main content
  • Skip to footer
  • Books
    • Content Strategy for WordPress (2015)
    • WordPress for Web Developers (2013)
    • Beginning WordPress 3 (2010)
  • Blog
    • Content Modeling for WordPress
    • WordPress Hidden Gems
    • Web Design
  • Work
    • Presentations and Interviews
    • on GitHub →
    • MLIS Class Projects (2019-2022)
    • Portfolio (2002-2019)
    • WordPress Plugins

Stephanie Leary

Writer, Front End Developer, former WordPress consultant

  • About
    • Press Kit
    • Presentations and Interviews
  • Contact Me

Various tricks with archive calendars

January 20, 2003 Stephanie Leary

These tricks apply to the tiny calendars that appear on your home page, not the full-screen monthly archives from my last post.

How to link to a full day’s entries instead of the last one on that day: – Turn on daily archives. – In your calendar code, replace this:

<MTEntries lastn="1"><a href="<$MTEntryPermalink$>"><$MTCalendarDay></a></MTEntries>

with this:

<MTEntries lastn="1"><a href="<$MTEntryLink archive_type="Daily">"><$MTCalendarDay$></a></MTEntries>

*****

How to print all monthly archive calendars (past, current, future) on one page: Read about it in &#8221;>this thread. If you’re not using your Master Archive Index for anything special, it’s perfect for this. Use it instead of creating another template; after all, if you screw it up, you can get the default code again from the MT site.

To get all the tiny calendars in the Master Archive Index [Example], use this:
<MTArchiveList archive_type="Monthly">

Add this style definition for table in your header:

Do not put that style in your global stylesheets, as it will alter the display of every table. The height attribute might make these tables look a little different than the ones on your home page, but it's necessary to get the calendars to line up in neat little rows. (Most of you probably won't even notice what I'm talking about.)

There are other ways of doing this – Kristine's tutorial, for one, uses tables to accomplish a similar layout. There's also Brad Choate's Yearly Archives plugin to organize everything.

*****

You can use the same MTArchive code with lastn to put 2 or 3 tiny calendars on any other template:
<MTArchiveList archive_type="Monthly" lastn="2">

However, if you have posts dated farther into the future than that, you might not end up with the months you want. If this happens, try Brad Choate's Supplemental Calendar Tags plugin. This will give you an offset value. Now you can keep your original calendar code from the default template, and add a second one using . You can use a negative offset to get last month's calendar instead of next month's, or you could go several months ahead… play with it!

*****

To make your calendar title a link to the full-screen month view, write your calendar head like so:
<caption class="calendarhead"><a href="<$MTArchiveLink>"><$MTArchiveDate format="%B %Y"$></a></caption>

[updated Feb. 10, 2003]

Blogging

This is an excerpt from Content Strategy for WordPress.My latest books are Content Strategy for WordPress (2015) and WordPress for Web Developers (2013). Sign up to be notified when I have a new book for you.

Footer

My Books

I’m a front end developer at Equinox OLI, working on open source library software. I was previously a freelance WordPress developer in higher education. You can get in touch here or on LinkedIn.

Copyright © 2025 Stephanie Leary · Contact