I am trying to customize my sidebar based on the category of the post that is currently being read. For example, I have videos that appear in the sidebar on my homepage, but when the user clicks on the Videos category, I don't want him to see videos again appear in the sidebar. I've managed to do this successfully by using a plugin that enables me to put PHP code into a widget, and using conditional tags in the widgets.
The problem I'm having is one of design. I want the widgets in my sidebar to be visually separated -- e.g., have the Categories widget in its own <div> frame, which makes it distinct from the Recent Posts widget. This works fine so long as I don't use custom PHP code widgets. When I do, all of the content visually combines. If, for example, I write code in one custom PHP widget that calls Recent Posts belonging to the same category as the post being read, and then write another custom PHP widget that shows, say, an image for that category, the image and Recent Posts appear in the same <div> frame, right next to each other.
I'd be grateful for any ideas on how to get around this but still using custom PHP widgets. My apologies if the above is confusing; it's probably because I'm confused. Thanks in advance for any help.