I want display different content in sidebar for every category, but as I create new ones I have to create the area for it. How can I have widget areas for every category and also display them on theme accordingly?
Not a good thing if you have a lot of categories, so be careful!
First, add the following function in
This is enough, now in Widgets you have a widget area for every category. Now you have to show the area for the category. I like to display the area for categories listings (categories posts listings) and the same area for posts using the category as well (single posts pages).
That's all, I bet someone can came up with a better code, by now this does the trick.