[wp-hackers] Add same widget to multiple sidebars

Dino Termini dino at duechiacchiere.it
Fri May 25 11:56:13 UTC 2012


Hi folks,

in my template I have multiple sidebars, one for the homepage, one for 
the archive page, and so on. Each of them has a different set of widgets 
in it, but some widgets should be shared among sidebars. I've written 
the usual code

function my_widget(){

}
wp_register_sidebar_widget(...)

But as soon as I assign a widget to a sidebar, it disappears from the 
list of available filters, making it unavailable for other sidebars. I 
see the Text Widget, though, can be reused multiple times. I've found a 
few different ways of doing this, but I'd like to ask this list about 
what's the 'final' and best way of making a 'reusable' widget.

Thanks folks,
Dino.


More information about the wp-hackers mailing list