Using the media uploader in a custom plugin

The output code of widget’s form method is added to page once for every instance of the widget (included the “dummy” instance contained in the “Available widgets” panel), so in your case the javascript code that defines the window.send_to_editor function may appear more than once, and the last instance overwrites the previous ones. There are … Read more

Manual display of widget

I like the answer you found, but I thought I’d tack on another. You could create another sidebar area that’s only displayed on the front page, and then use the “Duplicate Widget” plugin to maintain two instances of a single plugin. It has slightly higher overhead, but becomes much easier to maintain for someone who … Read more

Help adding image upload functionality to widget

I also noticed a typo in the url media-upload.php?type=image&amp&TB_iframe=1. Maybe this is the problem. Also a working example: jQuery( ‘input[id^=my_field]’ ).live( ‘click’, function($) { formfield = $( ‘input[id^=my_image]’, $(this).closest(‘.widget’) ).attr( ‘name’ ); tb_show( ”, ‘media-upload.php?type=image&TB_iframe=1’ ); return false; } );

How to use jQuery on widget admin page

I just had the same issue, which I resolved by changing all my IDs to classes. Remember that widgets can be used multiple times on page, so specifying an ID anywhere increases the likelihood that you’ll have ID duplication (Which will in turn cause jQuery to have a fit).

How Can I Duplicate a Widget?

I had the same Problem with one of my Clients, and found this GREAT soluiton: Duplicate Widget. It comes as a new Widget, but has just one option: choose which Widget it should duplicate, and you also see from where it is duplicated (for easy overview where to change the values of the original Widget). … Read more

Is It Possible to Restore Accidentally Deleted Widgets?

You have to search the wp_options database table for option_name‘s that contains widget. That search results in: Using the values of your backups, you’ll then proceed to restore the option_value of the missing widgets. And also the value of the option of sidebars_widgets. Goes without saying that backing up before doing this modifications is essential.