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 try to add the multi uploading options in a WordPress plugin. I repeated this code in the plugin (two times) only changing the ID.

<script language="JavaScript">
jQuery(document).ready(function($) {
    jQuery('#upload_image_button').click(function() {
        formfield = jQuery('#upload_image').attr('name');
        tb_show('', 'media-upload.php?type=image&TB_iframe=true');
        return false;

    window.send_to_editor = function(html) {
        imgurl = jQuery('img', html).attr('src');
    style=" margin-left:303px;" 
    value="<?php echo get_option('upload_image_template'); ?>" />
<input id="upload_image_button" type="button" value="Browse" />

Whenever I try to upload a image that media frame comes and the uploading process are did successfully. But Insert Into Post fetch the correct url but pasted in different input box. For example:

1) [text box1] [browse Button]
2) [text box2] [browse button]

When I upload image with Text Box One that [insert post] that image path is shown in [text box 2] I am Not Sure Whether the Problem is mine or that script didn't support multi file upload option.

share|improve this question
Use the new way to do this, wordpress.stackexchange.com/questions/78547/… – Wyck Jul 13 '13 at 15:52
This plugin does exactly what you need wordpress.org/plugins/multi-image-upload – Tahir Yasin Nov 20 '13 at 10:55

Your Answer


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

Browse other questions tagged or ask your own question.