Title: Exclude posts having sub categories
Last modified: December 18, 2019

---

# Exclude posts having sub categories

 *  [bjaxelsen](https://wordpress.org/support/users/bjaxelsen/)
 * (@bjaxelsen)
 * [6 years, 5 months ago](https://wordpress.org/support/topic/exclude-posts-having-sub-categories/)
 * When looking up posts of a specific category e.g.
    [loop type=page cat=3]
 * would it be possible to exclude items belonging in subcategories? So that you
   only include items in the main category, not in the subcategories?

The topic ‘Exclude posts having sub categories’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/custom-content-shortcode_766976.svg)
 * [Custom Content Shortcode](https://wordpress.org/plugins/custom-content-shortcode/)
 * [Support Threads](https://wordpress.org/support/plugin/custom-content-shortcode/)
 * [Active Topics](https://wordpress.org/support/plugin/custom-content-shortcode/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/custom-content-shortcode/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/custom-content-shortcode/reviews/)

 * 0 replies
 * 1 participant
 * Last reply from: [bjaxelsen](https://wordpress.org/support/users/bjaxelsen/)
 * Last activity: [6 years, 5 months ago](https://wordpress.org/support/topic/exclude-posts-having-sub-categories/)
 * Status: not resolved