Huskies pulling sledgeI’m writing this post with a clear sense of pride about having chosen CSS selectors as “configuration syntax” for Widget Voodoo. The power and flexibility of the approach over other other, more limitting approaches is amazing.

Thank to this power, it was a “piece of cake” to resolve a help request on how to collapse al widgets at oncel I’ve got recently.

The simplicity of accomplishing this is unequaled:

Make “Auto-collapsed Widgets Selector” the same as “Widget Selector”.

For example, if “Widget Selector” is set to “.widget”, you simply set “Auto-collapsed Widgets Selector” to “.widget”, too.

Isn’t it perfectly logical? It is almost like a simple math equation:

Auto-collapsed Widgets = Widgets.

The simplicity of this can hardly be beaten, right?

There’s extra sugar for those of you with 2 sidebars: To auto-collapse all widgets in sidebar-1 (sidebar-1 being its id): Make “Auto-collapsed Widgets Selector” the same as “Widget Selector”, prefixed by “#sidebar-1 “. Example: “#sidebar-1 .widget”.

Collapsing text widgets in the 2nd sidebar only? Here you go: “#sidebar-2 .textwidget”.

And I could go cheerfully spinning like this forever… :-)

2 Responses to “Widget Voodoo CSS Selectors Power”

  1. You are my hero! You delivered something in a week or two it would have probably taken me months to figure out on my own if ever, and now I can use it in any theme necessary. Too cool, too cool.

    Thanks!

  2. Well, I don’t want to sound braggy, but actually it was less than 4 days initially ;-)

    But seriously, thanks a lot for your compliments, Saintneko, I really appreciate it.

Leave a Reply

You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Please ignore these 2 fields: