Previous and Next in Category

Provides two container elements, <MTEntryPreviousInCategory> and <MTEntryNextInCategory> that work just like the <MTEntryPrevious> and <MTEntryNext> elements, except that they give you the previous and next entries that are in the same category as the primary category of the current entry.

Note that it does not give you the previous or next entry with a primary category the same as the current entry’s primary category: if the current entry is in category “A” and the previous entry has a primary category of “B” but is also in “A”, then <MTEntryPreviousInCategory> will take you to that previous entry, and from there the next <MTEntryPreviousInCategory> will be in category “B” rather than category “A”.

Download: PreviousNextInCategory.zip

Related weblog entry: Previous and next in category