WordPress Category Widgets plugin – display different widgets for different categories

Today, I have developed another plugin for WordPress which I named ‘Category Widgets’ plugin and as usual nothing more peaceful rather than sharing with the community.

Using this plugin, you can display a text widget for any specific category and/or its sub-categories. For example, you want to show different sidebar banners based on different category. It is easy using this plugin. Just create a new widget and select the category.

I have found another plugin for almost the same purpose. That plugin lacks of capability of displaying in the subcategories. That mean it does not work for the sub-categories of the selected category. In this plugin, I have made that feature and also optionally you can disable that feature too.


  1. WordPress 2.8+


Download WordPress Repo



  1. Download the above archive
  2. Extract it
  3. Upload to wp-content/plugins directory
  4. Goto administration panel of WordPress and the Plugins section
  5. Activate the Plugin by click Activate link
  6. Goto Appearance -> Widgets
  7. Drag the widget from the left side to your expected sidebar. You can add as many as you want. Configure the widget and save.
  8. You’r done!

Please don’t forget to say thanks, bug reports, feedbacks, suggestions and/or advices :).


Just few hours ago, the plugin is approved in the wordpress plugin repository. You can now find it there too.

  • nice plug.

    i will try it later.

    can u give us a job portal wp plug which is really work like a real job portal?

  • Hi,
    I love your category widget. I have noticed that after clicking on a post that is listed in your category widget I goto the correct post but your widget disappears from the side bar.
    Maybe you could check it out.

    -click a category(under categories)
    -see your widget listed on the right
    -click on a post listed in your widget
    -see how your widget disappears once you get to new post
    -click on a category(under categories) and your widget reappears.

    Another thing I noticed was when I click on an post listing on my Index Page Your widget does not appear once I go to the correct post.

    I am not complaining. I think your plugin is great. Just thought I would let you know the few things I noticed. I am still trying to figure out how to get the plugin that creates my list on the index page to list alphabetically. LOL:)

    Thanks a lot for your plug in and I hope this helps. If you edit those things it would be great to have a heads up.

  • The HungryCoder

    Did you mistakenly checked the option ‘Hide in Child Categories’?

    And yes, this won’t show widgets in homepage. Ordinary Text widgets are enough for same. So, I did not add this in my plugin.

    No problem even it is complain. I highly appreciate your inputs. Otherwise, it won’t be a great plugin :).

  • please ignore previous post. wrong plug in. Yours is great I have no problem with it.:) sorry

  • Hi,
    I install this plugin and I noticed tha it works only for category page (page that shows posts of a specific category only) and not for single posts.

  • The HungryCoder

    Thanks for using it. Yes, that is how it was initially planned. As name suggests, it will show the widget on categories ( and subcategories). However, if I notice demands, I will release an update version to show same widget on single post too.

  • I don’t mean that I want to have different content for every single post but I want the same content of sidebar widget for the posts of the same category. Is something I can change quickly to make it work for single posts of the same category?

  • The HungryCoder

    Sir, I understand what you wanted. Actually, this is not how I have planned it. Ok, I will try to make this feature in next release.

  • aritoni

    Ok I found another plugin that meets all my requirements in a very sumple way. Widget Logic.

  • The HungryCoder

    Yep, Widget Logic is wonderful plugin. I have also noticed that after making this one. If I would notice that earlier, I would not make it :).

  • Vanny

    Thanks, but i need to include subcategories … and post!!
    help 🙂

  • Neil

    Hi there. This is an awesome widget!

    I have one request…. It displays when you navigate to a category and when someone goes to the post it’s not there… as expected. BUT could there be a simple feature that “if no category” I can display something else? Is there another plug-in that does this?

    This would be awesome if it could be done.


  • kkrotto

    Excellent, also works perfect with images. Just use basic html like:
    or … also no problems with DIVs, Tables, and scripts…

    Hope in next version can check multiple categories

    Have fun,

  • diana

    Any way this could be used to have category related posts show up rather than only text? Can i put php in one of the widgets? someone above made it sound like it works with html.

  • Hi there! Does this support (custom) taxonomy categories ?
    I cant find one and i am really searching like a month now !

    Please help out 😉

  • The HungryCoder

    I think it won’t work. However, I think it is easily adjustable! I guess you just need to change how it retrieves category list in widget area. Front end should be work fine without any change!

  • Uhm…. how can i do this ? Coding is still something i should learn 😉

  • I found this category , its called “ad_cat” , can you tell me which part in the php i should modify in order to make this work ?
    Maybe you can add a dropdown showing al taxonomies , that would make this the first plugin with such an option!

  • Fantastic plugin! Curious, have you thought of adding the ability to customize based on pages and home, too?

  • The HungryCoder

    Nice to know you liked it. Nope, did not plan something like that.

  • Alyson

    Very nive plugin.

    Is compatible with wordpress 3.0.5?

  • Alyson

    Have any way to to do this plugin work with sub categories?

    i’m see this plugin only work with top level category and don’t only with some subcategory.


    I have a top level category NAME 1
    and it have 3 subcategories

    I need select some of this 3 subs.

  • So, i made a custom version of this plugin that allows you using it in single post pages. Here’s the link: http://www.fripsy.com/category-widget-mod/

  • Joske522

    Hi guys! Great plugin, works very well, but I would like to get it to display on the single posts filed under a category too… Anyone has a mod for this? Link of Marco Boffo is not working anymore… Thanks!

  • inmoderator

    This doesn’t seem to work on the latest wordpress — it’s only letting me choose from 4 out of my 20 categories, and is not displaying in my sidebars. Have you abandoned it?