Title: Excluding Category From Widget
Last modified: August 20, 2016

---

# Excluding Category From Widget

 *  [Foosho](https://wordpress.org/support/users/foosho/)
 * (@foosho)
 * [14 years, 4 months ago](https://wordpress.org/support/topic/excluding-category-from-widget/)
 * Hi all,
 * I try to exclude a category from my “categories widget”. Where and how can I 
   do this? Can’t find a file that controles the category list and where I can exclude
   a catt.
 * Thnx

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

 *  [Spike](https://wordpress.org/support/users/rdlucas2/)
 * (@rdlucas2)
 * [14 years, 4 months ago](https://wordpress.org/support/topic/excluding-category-from-widget/#post-2530785)
 * [http://wordpress.org/support/topic/exclude-specific-categories-from-sidebar-categories-widget?replies=5](http://wordpress.org/support/topic/exclude-specific-categories-from-sidebar-categories-widget?replies=5)
 * Found this link searching your post title in google. Give the plugin mentioned
   there a shot.
 *  Thread Starter [Foosho](https://wordpress.org/support/users/foosho/)
 * (@foosho)
 * [14 years, 4 months ago](https://wordpress.org/support/topic/excluding-category-from-widget/#post-2530913)
 * thnx for the quick reply. I also found several plugins, but I prefer code. After
   searching for a while, I found the following code, which should be placed in 
   MYTHEME/functions.php.
 * <?php
    function exclude_widget_categories($args){ $exclude = “3,6,18”; // The
   IDs of the excluding categories $args[“exclude”] = $exclude; return $args; } 
   add_filter(“widget_categories_args”,”exclude_widget_categories”); ?>
 *  [seanbelly](https://wordpress.org/support/users/seanbelly/)
 * (@seanbelly)
 * [14 years ago](https://wordpress.org/support/topic/excluding-category-from-widget/#post-2531178)
 * Nice solution Foosho!

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

The topic ‘Excluding Category From Widget’ is closed to new replies.

## Tags

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

 * In: [Hacks](https://wordpress.org/support/forum/plugins-and-hacks/hacks/)
 * 3 replies
 * 3 participants
 * Last reply from: [seanbelly](https://wordpress.org/support/users/seanbelly/)
 * Last activity: [14 years ago](https://wordpress.org/support/topic/excluding-category-from-widget/#post-2531178)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
