Adding a "Posted to Category" Line
The default settings for Movable Type include category archiving. If you assign categories to your posts, you may want to include that information in the "Posted by" section underneath each entry. This is quite easy to do.
In the Main Index template, find the following block of code:
<p class="entry-footer">
<span class="post-footers">Posted by <$MTEntryAuthorDisplayName$> at <$MTEntryDate format="%"$></span> <span class="separator">|</span> <a class="permalink" href="<$MTEntryPermalink$>">Permalink</a> <MTIfCommentsActive>| <a href="<$MTEntryPermalink$>#comments">Comments (<$MTEntryCommentCount$>)</a></MTIfCommentsActive> <MTIfPingsActive>| <a href="<$MTEntryPermalink$>#trackback">TrackBacks (<$MTEntryTrackbackCount$>)</a></MTIfPingsActive>
</p>
Add the following code before the closing closing p tag of the code above.
Posted to <MTEntryCategories glue=" | ">
<a href="<$MTCategoryArchiveLink$>"><$MTCategoryLabel$>
Save and rebuild your Main Index template.
In your Individual Entry Archive Template, find the following code:
<p class="entry-footer">
<span class="post-footers">Posted by <$MTEntryAuthorDisplayName$> on <$MTEntryDate$></span> <span class="separator">|</span> <a class="permalink" href="<$MTEntryPermalink$>">Permalink</a>
</p>
Add the following code before the closing span tag or p tag of the code above.
Posted to <MTEntryCategories glue=" | ">
<a href="<$MTCategoryArchiveLink$>"><$MTCategoryLabel$>
</a></MTEntryCategories>
Save template and rebuild your files.

Comments (11)
If you want to show Cateogry/SubCategory relationships (eg. Parent » Sub), use this code
<MTEntryCategories glue=", ">
<MTParentCategories glue = "» ">
<a href="<$MTCategoryArchiveLink$>"
title="<$MTCategoryDescription$>"><$MTCategoryLabel$></a>
</MTParentCategories>
</MTEntryCategories>
Posted on January 15, 2006
Any idea on how you would only show subcategories?
Posted on March 1, 2006
For the code on the individual archive template, does that only work if the archives are static? I'm using dynamic publishing for my archives, but for some reason can't get the code to work in my individual archive template.
Posted on April 6, 2006
Anyone know how I would be able to show just the parent category for an individual archive entry?
Posted on March 22, 2007
Yes how does one only show the entry's subcategory. MT's documentation is so sparse.
Posted on April 29, 2007
I tried Arvind's code on my website (www.notforsheep.org) and for some odd reason, it spits out the results in triplicate. Any ideas on how to just get the code to show one single result, i.e. PhD Stuff >> Fall 2007 >> Public Admin? Thanks! :-)
Posted on October 6, 2007
Wow. That is weird. I have no idea what might be causing it. Have you posted it at the MT forums?
Posted on October 6, 2007
I don't know a whole lot about MT, so I might be wrong, but this only worked for me when I added </a></MTEntryCategories>
to the end of the code you say to cut and paste into the main index template.
Posted on November 24, 2007
does this code apply to MT 4?
Posted on December 28, 2007
@MSD -
There shouldn't be anything version-specific to any of this code.
Posted on December 31, 2007
I'm looking for a way to show all of the parent categories, then list the child categories right after. Arvind's code in the first comment is close, but not quite what I'm after. This is basically what I want:
parent >> child, child, child
parent2 >> child, child, child
Any way to do this?
Using MTOS, in case that has some new tags or whatnot that will enable this...
Posted on May 12, 2008