WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have multiple sidebars, based on different pages. How can I get the WP125 widget to show on all of them?? Once I add it to one sidebar, it is unavailable to put on others (like many other widgets by the way).

Just to clarify, just multiple instances of the widget with the same content. In other words, the same widget but on more than one page (with different sidebars)

Below the registration function:

//Create Widget
function wp125_create_ad_widget() {
        register_sidebar_widget(__('WP125'), 'wp125_write_ads_widget');

Below the line I added to see if another widget is created in the widget area:

        register_sidebar_widget(__('WP125-2'), 'wp125_write_ads_widget'); //nothing happens with this line added.

The rest of the wp125.php file:

function wp125_write_ads_widget($args) {
        echo $before_widget;
        if (get_option("wp125_widget_title")!='') {
                echo "\n".$before_title; echo get_option("wp125_widget_title"); echo $after_title;
        echo $after_widget;
share|improve this question
I think you might be after The Widget(the_widget()) – t31os Feb 28 '11 at 19:37
I am not sure I follow how to use the_widget(the_widget()). could you include an answer with more detail for my benefit? Thanks. – Geo Mar 2 '11 at 12:53

You have two options:

Create the widget yourself with the "new" widget api as a class an it will be multiple instance widget.

Or find the line that registers the widget and register the same widget with a new name for example find:

register_sidebar_widget(array('Content License', 'widgets'), 'widget_cc');

and replace with:

register_sidebar_widget(array('Content License 1', 'widgets'), 'widget_cc');
register_sidebar_widget(array('Content License 2', 'widgets'), 'widget_cc');
register_sidebar_widget(array('Content License 3', 'widgets'), 'widget_cc');
register_sidebar_widget(array('Content License 4', 'widgets'), 'widget_cc');
share|improve this answer
See my comments, I tried your suggestion, but nothing happened on the widget area. – Geo Feb 27 '11 at 17:22
first you should use wp_register_sidebar_widget instead of register_sidebar_widget i was showing an example, second once you do use wp_register_sidebar_widget give it a different id and name each time you register it. read more about wp_register_sidebar_widget codex.wordpress.org/Function_Reference/… – Bainternet Feb 27 '11 at 18:13

//Create Widget
function wp125_create_ad_widget() {
register_sidebar_widget(__('WP125'), 'wp125_write_ads_widget');

replace the above function with the below function,

//Create Widget
function wp125_create_ad_widget() {
wp_register_sidebar_widget(__('WP125 1'),'WP125', 'wp125_write_ads_widget');
wp_register_sidebar_widget(__('WP125 2'),'WP125', 'wp125_write_ads_widget');

its work for me, wish its help you.

share|improve this answer
Please explain that. – toscho Nov 4 '12 at 0:00

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.