Title: [Plugin: WordPress Popular Posts] how to exclude categories
Last modified: August 20, 2016

---

# [Plugin: WordPress Popular Posts] how to exclude categories

 *  Resolved [globalreporter](https://wordpress.org/support/users/globalreporter/)
 * (@globalreporter)
 * [14 years, 3 months ago](https://wordpress.org/support/topic/plugin-wordpress-popular-posts-how-to-exclude-categories/)
 * In the widget I see the “Exclude category” option but I cannot find any place
   were I can type the IDs to exclude. Please help!
 * [http://wordpress.org/extend/plugins/wordpress-popular-posts/](http://wordpress.org/extend/plugins/wordpress-popular-posts/)

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

1 [2](https://wordpress.org/support/topic/plugin-wordpress-popular-posts-how-to-exclude-categories/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/plugin-wordpress-popular-posts-how-to-exclude-categories/page/2/?output_format=md)

 *  Plugin Author [Hector Cabrera](https://wordpress.org/support/users/hcabrera/)
 * (@hcabrera)
 * [14 years, 3 months ago](https://wordpress.org/support/topic/plugin-wordpress-popular-posts-how-to-exclude-categories/#post-2513411)
 * Hi globalreporter,
 * You need to tick the option and save first in order to see the input field.
 *  Thread Starter [globalreporter](https://wordpress.org/support/users/globalreporter/)
 * (@globalreporter)
 * [14 years, 3 months ago](https://wordpress.org/support/topic/plugin-wordpress-popular-posts-how-to-exclude-categories/#post-2513434)
 * Thanks. I tired. Now I can choose the categories to exclude. But I cannot exclude
   different different categories for each widget. When I exclude a category for
   the 1st widget, the same category is excluded for all widgets. Is it your plugin
   suitable for multi-widget use?
 *  Plugin Author [Hector Cabrera](https://wordpress.org/support/users/hcabrera/)
 * (@hcabrera)
 * [14 years, 2 months ago](https://wordpress.org/support/topic/plugin-wordpress-popular-posts-how-to-exclude-categories/#post-2513454)
 * Yes, it should allow you to set different categories on each widget. I just tested
   and added different categories on two separate widgets, both kept their configurations
   after saving changes.
 *  [ruzicic](https://wordpress.org/support/users/ruzicic/)
 * (@ruzicic)
 * [13 years, 10 months ago](https://wordpress.org/support/topic/plugin-wordpress-popular-posts-how-to-exclude-categories/#post-2513522)
 * Do you know how can I exclude categories if im using php code in my template 
   file?
    `<? echo get_mostpopular('range="weekly"&order_by="views"&pages=0&stats_views
   =0&stats_comments=0&thumbnail_width=40&thumbnail_height=40&limit=7'); ?>`
 * Maybe **exclude=ID**?
 *  [drogbadvc](https://wordpress.org/support/users/drogbadvc/)
 * (@drogbadvc)
 * [13 years, 9 months ago](https://wordpress.org/support/topic/plugin-wordpress-popular-posts-how-to-exclude-categories/#post-2513523)
 * Hello, I’m French
 * Example : <?php if (function_exists(‘wpp_get_mostpopular’)) wpp_get_mostpopular(“
   range=all-time&order_by=views&limit=5&cats_to_exclude=5,6,7”); ?>
 * Code exclude categories : &cats_to_exclude=
 *  [markross1967](https://wordpress.org/support/users/markross1967/)
 * (@markross1967)
 * [13 years, 9 months ago](https://wordpress.org/support/topic/plugin-wordpress-popular-posts-how-to-exclude-categories/#post-2513528)
 * Hi,
    This is a GREAT plugin, thank you!
 * The exclude category option works very well. I wish there was an include (only)
   option, as well. I would like to a a WP Popular Post Widget that only shows the
   results of one category.
 * Is that possible?
 * Thank you.
 *  [magician1111](https://wordpress.org/support/users/magician1111/)
 * (@magician1111)
 * [13 years, 8 months ago](https://wordpress.org/support/topic/plugin-wordpress-popular-posts-how-to-exclude-categories/#post-2513540)
 * Pardon me for not understanding. Please help. What do you mean “tick the option
   first…”?
 * Also, in my dashboard when I go to Post Categories, none of the Categories have
   any numbers or IDs as you call them. I assumed that typing in the blank labeled“
   Category(ies) ID(s):” the number with a minus sign in front of it would exclude
   that category. Since I have 24 Post Categories on my blog, I assume that the 
   fourth one is number 4. I typed -4 in the blank and your plugin still does not
   exclude that category. I also tried typing in just plain 4. Still doesn’t work.
   Please tell me what I’m doing wrong. I have had this problem since I downloaded
   your plugin over two years ago. How do I find out what the Category(ies) ID(s)
   are for any given Post Category? Why doesn’t typing that number in the box labeled“
   Category(ies) ID(s):” eliminate that Category from the post rankings?
    [http://landscapephotographyblogger.com/](http://landscapephotographyblogger.com/)
   I want to exclude the category I call “David’s Perspective” from the Most popular
   posts rankings.
 *  [markross1967](https://wordpress.org/support/users/markross1967/)
 * (@markross1967)
 * [13 years, 8 months ago](https://wordpress.org/support/topic/plugin-wordpress-popular-posts-how-to-exclude-categories/#post-2513541)
 * magician,
 * Please consider installing this plug-in:
    WP Show IDs
 * After you install it, the category IDs will be shown to the right on each Category,
   under Categories, in the Dashboard.
 *  [markross1967](https://wordpress.org/support/users/markross1967/)
 * (@markross1967)
 * [13 years, 8 months ago](https://wordpress.org/support/topic/plugin-wordpress-popular-posts-how-to-exclude-categories/#post-2513542)
 * magician,
 * Here you go:
    [http://wordpress.org/extend/plugins/wp-show-ids/](http://wordpress.org/extend/plugins/wp-show-ids/)
 *  Plugin Author [Hector Cabrera](https://wordpress.org/support/users/hcabrera/)
 * (@hcabrera)
 * [13 years, 8 months ago](https://wordpress.org/support/topic/plugin-wordpress-popular-posts-how-to-exclude-categories/#post-2513543)
 * Hi magician1111,
 * This thread is over 7 months old now. Info posted there does not apply to the
   current version of the plugin. Follow markross1967 instructions to find out the
   categories’ IDs.
 * Thanks Mark!
 *  [magician1111](https://wordpress.org/support/users/magician1111/)
 * (@magician1111)
 * [13 years, 8 months ago](https://wordpress.org/support/topic/plugin-wordpress-popular-posts-how-to-exclude-categories/#post-2513544)
 * Thank you so much markross1967 and Hector Cabrera for your help! That worked 
   very well.
 *  [markross1967](https://wordpress.org/support/users/markross1967/)
 * (@markross1967)
 * [13 years, 8 months ago](https://wordpress.org/support/topic/plugin-wordpress-popular-posts-how-to-exclude-categories/#post-2513546)
 * You’re welcome magician.
 * Glad it worked out well for you. It is a simple, yet very nice, plugin.
 *  [thedentalwarrior](https://wordpress.org/support/users/thedentalwarrior/)
 * (@thedentalwarrior)
 * [13 years, 6 months ago](https://wordpress.org/support/topic/plugin-wordpress-popular-posts-how-to-exclude-categories/#post-2513577)
 * Hello!
 * I’m trying to exclude a category. But, in my widgets area, there is no box or
   area to exclude a category.
 * I found a box under FILTERS. Thinking that this was the place to do it, I put
   my category ID in that box. But, I found out that makes it so the popular posts
   for ONLY that category will show.
 * In my widget area, there is no place to EXCLUDE a category that I can find. Help!
   Thanks!
 *  [markross67](https://wordpress.org/support/users/markross67/)
 * (@markross67)
 * [13 years, 6 months ago](https://wordpress.org/support/topic/plugin-wordpress-popular-posts-how-to-exclude-categories/#post-2513578)
 * All you need to do to exclude a category, in the Popular Posts widget, is put
   a (-) minus sign before the category ID.
 *  [thedentalwarrior](https://wordpress.org/support/users/thedentalwarrior/)
 * (@thedentalwarrior)
 * [13 years, 6 months ago](https://wordpress.org/support/topic/plugin-wordpress-popular-posts-how-to-exclude-categories/#post-2513579)
 * [@markross67](https://wordpress.org/support/users/markross67/)
 * BINGO! Thanks! That did it!

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

1 [2](https://wordpress.org/support/topic/plugin-wordpress-popular-posts-how-to-exclude-categories/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/plugin-wordpress-popular-posts-how-to-exclude-categories/page/2/?output_format=md)

The topic ‘[Plugin: WordPress Popular Posts] how to exclude categories’ is closed
to new replies.

 * ![](https://ps.w.org/wordpress-popular-posts/assets/icon-256x256.png?rev=1232659)
 * [WP Popular Posts](https://wordpress.org/plugins/wordpress-popular-posts/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wordpress-popular-posts/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wordpress-popular-posts/)
 * [Active Topics](https://wordpress.org/support/plugin/wordpress-popular-posts/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wordpress-popular-posts/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wordpress-popular-posts/reviews/)

 * 17 replies
 * 9 participants
 * Last reply from: [BeenGaming](https://wordpress.org/support/users/beengaming/)
 * Last activity: [13 years, 6 months ago](https://wordpress.org/support/topic/plugin-wordpress-popular-posts-how-to-exclude-categories/page/2/#post-2513581)
 * Status: resolved