Title: Cant exclude :(
Last modified: August 19, 2016

---

# Cant exclude :(

 *  Resolved [cucelo](https://wordpress.org/support/users/cucelo/)
 * (@cucelo)
 * [17 years, 3 months ago](https://wordpress.org/support/topic/cant-exclude/)
 * Hi friends, I have a category named “lead” for the featured part of my theme.
   But although I tried I couldnt manage to exclude it .. Last time I tried the 
   following once, but I couldnt
 * function wp_list_categories($args = ”) {
    $defaults = array( ‘show_option_all’
   => ”, ‘orderby’ => ‘name’, ‘order’ => ‘ASC’, ‘show_last_update’ => 0, ‘style’
   => ‘list’, ‘show_count’ => 0, ‘hide_empty’ => 1, ‘use_desc_for_title’ => 1, ‘
   child_of’ => 0, ‘feed’ => ”, ‘feed_type’ => ”, ‘feed_image’ => ”, ‘exclude’ =
   > ”, ‘current_category’ => 0, ‘hierarchical’ => true, ‘title_li’ => __(‘Categories’),‘
   echo’ => 1, ‘depth’ => 0 <?php wp_list_categories(‘exclude=9’); ?> );

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

 *  [MichaelH](https://wordpress.org/support/users/michaelh/)
 * (@michaelh)
 * [17 years, 3 months ago](https://wordpress.org/support/topic/cant-exclude/#post-942908)
 * There is a problem with excluding ‘child categories’ as shown with [http://trac.wordpress.org/ticket/8614](http://trac.wordpress.org/ticket/8614)
   but all you should need is
    `<?php wp_list_categories('exclude=9'); ?>`
 * The rest of the code you show would be unnecessary.
 *  Thread Starter [cucelo](https://wordpress.org/support/users/cucelo/)
 * (@cucelo)
 * [17 years, 3 months ago](https://wordpress.org/support/topic/cant-exclude/#post-942949)
 * hi michael
 * I couldnt do it… where should I write this code ? I hope I am wrting the right
   place..
 *  [krembo99](https://wordpress.org/support/users/krembo99/)
 * (@krembo99)
 * [17 years, 3 months ago](https://wordpress.org/support/topic/cant-exclude/#post-942955)
 * In you template file (e.g. index.php , archive.php, etc.)

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

The topic ‘Cant exclude :(’ is closed to new replies.

## Tags

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

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 3 replies
 * 3 participants
 * Last reply from: [krembo99](https://wordpress.org/support/users/krembo99/)
 * Last activity: [17 years, 3 months ago](https://wordpress.org/support/topic/cant-exclude/#post-942955)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
