Title: Exclude Category from list
Last modified: August 21, 2016

---

# Exclude Category from list

 *  Resolved [downloadabeat](https://wordpress.org/support/users/downloadabeat/)
 * (@downloadabeat)
 * [12 years, 3 months ago](https://wordpress.org/support/topic/exclude-category-from-list/)
 * Hi is there any way to exclude a category by id from the list? Lets say I just
   want to filter all audio categories? Is there a way to add it in the shortcode?
   Thanks! Great plugin by the way!
 * [http://wordpress.org/plugins/search-filter/](http://wordpress.org/plugins/search-filter/)

Viewing 15 replies - 1 through 15 (of 21 total)

1 [2](https://wordpress.org/support/topic/exclude-category-from-list/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/exclude-category-from-list/page/2/?output_format=md)

 *  Plugin Author [Ross Morsali](https://wordpress.org/support/users/designsandcode/)
 * (@designsandcode)
 * [12 years, 3 months ago](https://wordpress.org/support/topic/exclude-category-from-list/#post-4520867)
 * Hey downloadabeat, thanks for the message. Unfortunately there is no way to include/
   exclude categories at this stage.
 * I will look at including this feature in a future updates as there have been 
   a few requests for this 🙂
 *  [robi333](https://wordpress.org/support/users/robi333/)
 * (@robi333)
 * [12 years, 3 months ago](https://wordpress.org/support/topic/exclude-category-from-list/#post-4520996)
 * Hi, if it will be possible to exclude/include category and/or tag from the list
   in the shortcode it will be a great help to me.
    Thank you! Anyway I agree it
   is a great plugin.
 *  [donnytree](https://wordpress.org/support/users/donnytree/)
 * (@donnytree)
 * [12 years, 2 months ago](https://wordpress.org/support/topic/exclude-category-from-list/#post-4521053)
 * Just adding in my two cents, awesome plugin! I have the same problem as others
   though, I need to exclude certain categories from the selection list.
 * This is the only plugin that seems to work the best for this since the 3.8.1 
   upgrade.
 * Thanks!
 *  [donnytree](https://wordpress.org/support/users/donnytree/)
 * (@donnytree)
 * [12 years, 2 months ago](https://wordpress.org/support/topic/exclude-category-from-list/#post-4521055)
 * For those of you still interested and who know PHP, I was able to exclude categories
   from my dropdown menu by hacking the plugin a bit.
 * Go to the search-filter.php file in the plugin folder, and in the generate_wp_dropdown
   function (line 1396), in the line BEFORE `wp_dropdown_categories($args);` is 
   called (line 1421), I entered the following code: `$args['exclude'] = YOUR_CAT_NUM;`,
   e.g.,
 *     ```
       ...    }
               $args['exclude'] = 2;
   
               $returnvar .= wp_dropdown_categories($args);
   
               return $returnvar;
       }
       ```
   
 * If you are not using a dropdown, you probably have to add this into one of the
   other functions, and on updates you will need to reinsert the code, but at least
   it’s a work around for now.
 *  [robi333](https://wordpress.org/support/users/robi333/)
 * (@robi333)
 * [12 years, 2 months ago](https://wordpress.org/support/topic/exclude-category-from-list/#post-4521057)
 * Hi donnytree,
    It’s fine you found a way around. But it is possible to exclude
   more categories than one by means of your $args[‘exclude’] ? Kind regards, R
 *  [donnytree](https://wordpress.org/support/users/donnytree/)
 * (@donnytree)
 * [12 years, 2 months ago](https://wordpress.org/support/topic/exclude-category-from-list/#post-4521058)
 * You should be able to just do:
    `$args['exclude'] = 2,3,4,5;`
 *  [robi333](https://wordpress.org/support/users/robi333/)
 * (@robi333)
 * [12 years, 2 months ago](https://wordpress.org/support/topic/exclude-category-from-list/#post-4521063)
 * Hi donnytree,
    Thank you very much donny. Have a nice day Kind regards, R
 *  [robin1604](https://wordpress.org/support/users/robin1604/)
 * (@robin1604)
 * [12 years, 2 months ago](https://wordpress.org/support/topic/exclude-category-from-list/#post-4521065)
 * Hi donnytree,
 * If I use comma’s then I got an error. Do you have an solution for this problem?
 * Thanks,
 * Robin
 *  Plugin Author [Ross Morsali](https://wordpress.org/support/users/designsandcode/)
 * (@designsandcode)
 * [12 years, 2 months ago](https://wordpress.org/support/topic/exclude-category-from-list/#post-4521066)
 * Hey robin I’mg guessing you use it as a string:
 *     ```
       $args['exclude'] = "2,3,4,5";
       ```
   
 * Thanks donnytree for providing your workaround 🙂
 *  [robin1604](https://wordpress.org/support/users/robin1604/)
 * (@robin1604)
 * [12 years, 2 months ago](https://wordpress.org/support/topic/exclude-category-from-list/#post-4521069)
 * I used this:
    `$args['exclude'] = 2,3,4,5;` Result was an error
 * Now i’m using this:
    `$args['exclude'] = "2,3,4,5";` Result is perfect 😀
 * Thank you for your help!
 *  [lbarron](https://wordpress.org/support/users/lbarron/)
 * (@lbarron)
 * [12 years, 1 month ago](https://wordpress.org/support/topic/exclude-category-from-list/#post-4521077)
 * No offense, but this seems like a given to include with the plugin, and there
   have clearly been several requests, including my need for it. Great plugin once
   we can get this! And I know I’ll use it several times!
 * I do appreciate your efforts…so thanks! Plugging away on work-around in the meantime…
   looking forward to update
 *  Plugin Author [Ross Morsali](https://wordpress.org/support/users/designsandcode/)
 * (@designsandcode)
 * [12 years, 1 month ago](https://wordpress.org/support/topic/exclude-category-from-list/#post-4521078)
 * Hey lbarron, it takes a lot of time to do coding for free and manage the support
   on here – so I try to do the updates when I have time and do what I think is 
   best for the plugin and the users.
 * Currently, there are lot of configurable options with the plugin and in the shortcode,
   so if you would use a shortcode with all the functionality the plugin offers,
   you would have a very complicated shortcode that is many lines long and to be
   honest it can be very confusing.
 * So the next stage of the project is to develop an admin interface which makes
   it really easy to build a search form, and will also make it easier to add in
   new features such as category including/excluding (+ many more).
 * But, building a whole admin interface with a really easy to use UI is not an 
   easy task! So please be patient, all free plugin developers are donating a lot
   of their personal time to their plugins (if they are actively maintained) 🙂
 * Anyway, with the amount of developing hours it takes to add more features it 
   is possible I will launch a pro version and provide better support for things
   like feature requests!
 *  [lbarron](https://wordpress.org/support/users/lbarron/)
 * (@lbarron)
 * [12 years, 1 month ago](https://wordpress.org/support/topic/exclude-category-from-list/#post-4521080)
 * Thanks for your response…I know better than to write a message right when I’m
   in the middle of working on it and also do many things for free, so I should 
   be the first one to appreciate it. I know it takes time and an admin panel does
   take a lot of effort, so if you do it, will be looking forward to it, as well
   as a premium version. Headed on the right track and seems like something MANY
   will benefit from so hopefully your efforts will reap its rewards. Thanks again
   and I’ve got it working in the meantime!
 *  Plugin Author [Ross Morsali](https://wordpress.org/support/users/designsandcode/)
 * (@designsandcode)
 * [12 years, 1 month ago](https://wordpress.org/support/topic/exclude-category-from-list/#post-4521081)
 * No worries good to hear lbarron 🙂
 *  [mcleek21](https://wordpress.org/support/users/mcleek21/)
 * (@mcleek21)
 * [12 years ago](https://wordpress.org/support/topic/exclude-category-from-list/#post-4521092)
 * Hi DesignAndCode,
 * Great plugin, any update on this? I am in need of this ability as well but cannot
   use the hack provided as I am on multisite and don’t want to exclude category
   ID’s that overlap on multiple sites so the only way to do it would be in the 
   shortcode or inside the theme template.
 * Any update would be appreciated. Again this plugin is really helpful.

Viewing 15 replies - 1 through 15 (of 21 total)

1 [2](https://wordpress.org/support/topic/exclude-category-from-list/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/exclude-category-from-list/page/2/?output_format=md)

The topic ‘Exclude Category from list’ is closed to new replies.

 * ![](https://ps.w.org/search-filter/assets/icon-256x256.png?rev=3096093)
 * [Search & Filter](https://wordpress.org/plugins/search-filter/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/search-filter/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/search-filter/)
 * [Active Topics](https://wordpress.org/support/plugin/search-filter/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/search-filter/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/search-filter/reviews/)

## Tags

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

 * 21 replies
 * 12 participants
 * Last reply from: [marcelinosi](https://wordpress.org/support/users/marcelinosi/)
 * Last activity: [11 years, 8 months ago](https://wordpress.org/support/topic/exclude-category-from-list/page/2/#post-4521119)
 * Status: resolved