Widget Voodoo CSS Selectors Power

Feb 19, 2009   //   by Hackadelic   //   WordPress  //  5 Comments

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… 🙂

5 Comments

  • Hi there,

    what a fantastic plugin! Thank you so much!

    I posed the question on the main page, but maybe it is better suited here:
    How can I target 2 sidebars with the “Widget Selector” option? Is that possible? Would I just use a comma separated list?

    • Yes, just like in CSS.

  • you are an absolute genius! thank you so much!!!

  • 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!

    • 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.

Blog Categories

I have come here to chew bubblegum and kick ass...
and I'm all out of bubblegum.
-- Nada in They Live