Ban certain widgets from certain sidebars

You are overthinking it. The concept of widgets is designed to be transferable between widget area (AKA sidebars). If a widget is not tranferable it is just not a true wordpress widget.

Now creating your own framework of widgets sound like a non pleasant idea. In addition to fighting the wordpress core code, you will find yourself fighting established user expectations about widgets.

So you have basically two options, call it “Baitar’s sidebars and widgets” to signal to the user they are not true wordpress widgets, and replicate the wordpress core code to manage them. Or just ask yourself why are you writing substandard widgets, and fix your design and code.

The third, and probably the easiest option, is just to let the user do whatever it wants and let him see by himself that the widgets do not work. Just provide proper documentation for that.

Leave a Comment