[wp-hackers] single widget configuration for multiple instances if a widget

Paul paul at codehooligans.com
Mon Sep 13 19:00:50 UTC 2010


I've not used Widgets much on past client sites. I know by extending WP_Widget setting up the widget form in the admin area is mostly trivial. But here is my issue. I have a client site which has 5 major sections. Each section will have the same 5-8 widgets but in different order. 

If I register multiple sidebars (side1, side2, etc) for the widgets. Then I can assign the widgets to the respective sidebars in the order I need. Then what I get is multiple instances of the widgets. I don't want that because each of these custom widgets are somewhat complicated and change often. So I don't want the client to need to update each sidebar's instance of a given widget. I prefer to have one instance of that widget that I can use multiple times as I need to for each sidebar. I though about setting up a new post type where the widget information is set. Then each widget itself would pull in the content from the post type. But this seems hack-ish and for some reason I tend to think the WP Widget system should handle my need. I'm just not seeing the logic I'm looking for. 

Has anyone come across this use case? Does anyone have an idea on getting this accomplished?

P-



More information about the wp-hackers mailing list