List Recent Comments
Question
How can I list recent comments to my blog on my Main Index page?
Answer
There are two basic variations on this type of display.
Via MTComments tag
You can put the following into your Main Index Template:
<MTComments lastn="6" sort_order="descend">
<p><$MTCommentAuthor$> said:<br />
<$MTCommentBody$></p>
</MTComments>
This will display the 6 most recent comments made on any of the entries in your weblog, and sort them in reverse chronological order (most recent first).
Via MTEntries tag
Another variation is to use the recently_commented_on attribute for the MTEntries tag:
<MTEntries recently_commented_on="6">
<MTComments lastn="1">
<p><$MTCommentAuthor$> said:<br />
<$MTCommentBody$></p>
</MTComments>
</MTEntries>
This will display the 6 most recently commented-on entries. Each entry will appear in the list only once, so if, for example, a comment is posted to Entry A, then a comment to Entry B, then another to Entry A, there will be two entries displayed: Entry A, then Entry B.


