The Movable Type Knowledge Base

Exclude or Include A Category From An Entries List

Question

I want to exclude or include a category from the list of entries on my index page. How do I do that?

Answer

If you only have a few categories, you can specify the ones you want to appear by using the category attribute:

<MTEntries category="Apples OR Bananas OR Peaches">

That would exclude any entries in a category called Oranges.

If you have several categories, listing them all with an OR could be tedious. In that case, you should consider using the ExcludeCategories plugin. You can also find out more about the MTEntries tag.

Submit Feedback on This Article

Your comments on how we can improve this article are appreciated; but please do not use the feedback form to submit support requests or questions. We will not respond to or publish such queries submitted through this form. If you have a technical question or problem, visit Movable Type Support.

Yahoo! Small Business web hosting services

Six Apart
Makers of weblog software and services for individuals, organizations and businesses.
This website is powered by Movable Type.