Not a developer? Go to

Plugin and Theme Directory

Categories by Date v1.0.1

By Dan Wolfgang
Posted February 11, 2010, in MT Tags, Templates, Widgets.



Categories are not a date-related object in MT, so publishing categories in a date-structured way isn’t possible.

The CategoriesByDate plugin adds a block tag that will sort categories by date, with the most recently updated first. To determine the order of the categories, each category is compared to newest entry it is used in and that entry’s date sorts the category.


This plugin adds the <mt:CategoriesByDate>...</mt:CategoriesByDate> block tag, which creates a category context. The following is a simple example of its use, and will return an unordered list of categories sorted by the date of their last use.

    <mt:If name="__first__">
    <mt:If name="__last__">

CategoriesByDate can also take a few arguments to help you refine the tag’s results:

  • The top argument can be set to a value of 1. This will return only the top-level categories.
  • The include_children argument can be set to a value of 1. This will cause the current category’s subcategories and their contents to be considered when determining the current category’s date.
  • The limit argument can be set to a positive number to limit the number of results returned, making it easy to create a list of the five recently-active categories, for example.

Below is an example that makes use of all of these arguments. Only the top-level categories are returned, but all subcategories are considered when determining the order of the top-level categories. Only the first 5 categories are returned. A link to the newest entry in that category is also published.

<mt:CategoriesByDate top="1" include_children="1" limit="5">
    <mt:If name="__first__">
            <span class="category"><a href="<mt:CategoryArchiveLink>"><mt:CategoryLabel></a></span>:
            <mt:CategoryLabel setvar="current_category">
            <span class="entry"><mt:Entries category="$current_category" lastn="1"><a href="<mt:EntryPermalink>"><mt:EntryTitle></a></mt:Entries></span>
    <mt:If name="__last__">


This plugin was commissioned by The Roster, a web marketing and design team, to Dan Wolfgang of uiNNOVATIONS.


Movable Type versions: 4.35.0


Perl Artistic



Rahul Sharma

Rahul Sharma on September 2, 2016, 9:18 a.m. Reply

Happy New Year 2017 images Get Happy New Year 2017 Wishes Quotes thoughts Messages Images wallpaper. All SMS are handpicked and best short simple.

Merry Christmas 2016 sayings

Eliza Gallagher

Eliza Gallagher on May 24, 2017, 8:31 p.m. Reply

Great addition to my MT install. I love keeping things organized, and this was one of the pet peeves that I had for a while. I wish I would have found it sooner, guess I was Snow Blind. :) Great work, thanks for sharing!


jatin on January 20, 2018, 9:15 a.m. Reply

get the exact information here for free how to open internet explorer in windows 10


JOHN on February 25, 2018, 6:15 p.m. Reply

get the exact information here for free solarmovies solarmovie

tom curran

tom curran on May 2, 2018, 10:59 a.m. Reply

Whirlpool Destroyer is the top non-electric water purifier in India. We compare best water purifier for home use and list the top 10 best water purifiers.


stergue on June 13, 2018, 2:16 p.m. Reply

Actually this is one of the most exciting articles. cb01 hd streaming


Jacky888 on July 26, 2018, 11:04 a.m. Reply

download firmware for printer pdn 626b firmware update gofirmware psp3468duo root bestandroidtoroot.


johnb6174 on August 11, 2018, 8:06 a.m. Reply

The post is written in very a good manner and it contains many useful information for me.


john on August 11, 2018, 5:01 p.m. Reply

Excellent information on your blog, thank you for taking the time to share with us. Amazing insight you have on this, it’s nice to find a website that details so much information about different artists. Online quran classes


johnb6174 on August 12, 2018, 4:24 p.m. Reply

I high appreciate this post. It’s hard to find the good from the bad sometimes, but I think you’ve nailed it! would you mind updating your blog with more information? techinexpert


john on August 13, 2018, 4:06 p.m. Reply

I high appreciate this post. It’s hard to find the good from the bad sometimes, but I think you’ve nailed it! would you mind updating your blog with more information?


johnb6174 on August 19, 2018, 8:44 a.m. Reply

Thank you for such a well written article. It’s full of insightful information and entertaining descriptions. Your point of view is the best among many.

Leave a Comment

Dan Wolfgang

Dan is an engineering creative and uses his vast knowledge of the web to solve unique client problems with specialized solutions. Complex or straightforward, his focus is to find the most efficient, functional, elegant, and stable solutions for each project. 10 years in web engineering and 14 more in the print publishing industry give him a special insight to the needs, restrictions, and workflows of content publishers, both traditional and new media. Dan is an active Movable Type community member who has written and contributed to countless plugins including some of the most popular: More Custom Fields, Poll Position, and Asset Image Quality.

Twitter: @danwolfgang