I have a channel with entries in categories and subcategories. I want to output a list of only the entries that are not in the subcategories. Is there a way to do an "only A" or "A & not anything else" type of selection?

3 Answers 3


I'd look to use GWCode Categories. You have the same control over inclusions and exclusions but a whole load more on top. excl_cat_id and excl_cat_id_children could be useful here if the categories are relatively fixed and you know their IDs.


Try Dandy Cat. it allow really crazy stuff on categories.


You can use the



You can exclude all child categories

category="not 2|14|16"

or specify all parent categories


Check out the docs: http://ellislab.com/expressionengine/user-guide/modules/channel/channel_entries.html#category

  • Thanks. I'm not sure if this works, though. Edit: sorry, hit enter. I tried dynamically building a list (a|b|c) of every category but the one to show, but in the docs it says "If you are using exclusion (category="not 3|4") and an entry is in a category that is not excluded, the entry will be returned even if it also belongs to an excluded category." Is there a way around that?
    – Michael
    May 22, 2013 at 19:10
  • 1
    It means that when an entry has a parent AND a child category it will be displayed, even though the child category is excluded. Just make sure you turn off auto-assign parent categories (ellislab.com/expressionengine/user-guide/cp/admin/channels/…) and you should be fine.
    – okenathan
    May 22, 2013 at 19:36
  • Turning off auto-assign seems to meet my needs nicely (assuming nobody else comes back and changes the categories.)
    – Michael
    May 23, 2013 at 6:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.