Title: Exclude sub categories
Last modified: August 18, 2016

---

# Exclude sub categories

 *  [nikos](https://wordpress.org/support/users/nikos/)
 * (@nikos)
 * [20 years, 2 months ago](https://wordpress.org/support/topic/exclude-sub-categories/)
 * Hello, how can I exclude subcategories from showing. I want to have only my main
   categories show up and I have this code:
 * <?php list_cats(0, ”, ‘name’, ‘asc’, ”, 1, 0, 0, 1, 1, 1, 0,”,”,”,”,”) ?>
 * I can’t find the correct point in this code to change so only main categories
   appear.
    Any help would be greatly appreciated.
 * Thanks

Viewing 4 replies - 1 through 4 (of 4 total)

 *  [Chris_K](https://wordpress.org/support/users/handysolo/)
 * (@handysolo)
 * [20 years, 2 months ago](https://wordpress.org/support/topic/exclude-sub-categories/#post-364950)
 * [list_cats](http://codex.wordpress.org/list_cats) for documentation. Looks like
   the 11th parm is a true/false to show children.
 * So, try something like
    `<?php list_cats(0, '', 'name', 'asc', '', 1, 0, 0, 1,
   1, 0, 0,'','','','','') ?>`
 *  [moshu](https://wordpress.org/support/users/moshu/)
 * (@moshu)
 * [20 years, 2 months ago](https://wordpress.org/support/topic/exclude-sub-categories/#post-364951)
 * HS meant this link [Template_Tags/list_cats](http://codex.wordpress.org/Template_Tags/list_cats)
   🙂
 *  [Chris_K](https://wordpress.org/support/users/handysolo/)
 * (@handysolo)
 * [20 years, 2 months ago](https://wordpress.org/support/topic/exclude-sub-categories/#post-364953)
 * Doh. Thanks Moshu. Darned shortcuts got me.
 *  Thread Starter [nikos](https://wordpress.org/support/users/nikos/)
 * (@nikos)
 * [20 years, 2 months ago](https://wordpress.org/support/topic/exclude-sub-categories/#post-365428)
 * Whataver the setting, it always shows ALL categories (and sub as well, like they’re
   equal with main categories).
 * Doesn’t seem to work this parametric setting.

Viewing 4 replies - 1 through 4 (of 4 total)

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

## Tags

 * [subcategories](https://wordpress.org/support/topic-tag/subcategories/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 4 replies
 * 3 participants
 * Last reply from: [nikos](https://wordpress.org/support/users/nikos/)
 * Last activity: [20 years, 2 months ago](https://wordpress.org/support/topic/exclude-sub-categories/#post-365428)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
