How To Insert Multiple Images In WordPress 2.6 Without Using Shortcode?
Starting from WordPress 2.5, uploading multiple images or files is as easier as those who are using New Blogger platform provided by Google Inc. Question: Other than using shortcode, is there other ways to do so?
Intro: WordPress 2.5+ could upload multiple files in one go
Unlike New Blogger image uploader, the WordPress 2.5+ “select files to upload” dialog box works exactly a standard Windows file selection dialog box – press CTRL+A to select all images files; CTRL+Mouse-click to select multiple files; highlight first picture file and press SHIFT key while selecting the last picture file to select all files in between, inclusively.
The WordPress 2.5+ image file uploader allow any number of images per upload in one go. I.e. you’re not limited to a maximum 5 images per single upload, as in New Blogger.
It’s cool, isn’t it? Not only that. With WordPress 2.5+, you could also use “WordPress Gallery Shortcode” to insert multiple images to the post editor!
As the name suggest, the WordPress Gallery Shortcode is like Linux alias command but it’s pre-defined in WordPress core files (i.e. general user couldn’t redefine the shortcode in the plain/default WordPress admin pages).
However, some WordPress fans is not really keen on the image shortcode for some reasons, e.g. it can’t define which image of the gallery to display or not to display, the sequence of displaying each image in the gallery, etc.
How to insert multiple images in WordPress 2.6.1?
I am using WordPress version 2.6.1 for this topic, but the original trick I’m referring to was suggested by beardedknight in WordPress forum for WordPress 2.5 (so, it supports to work fine for version 2.5+).
If you’re not comfortable with this simple PHP code modification (PHP mod), then just stick to the default behaviour or look for some good WordPress gallery plugin. Good luck.
Howto, Internet, Blog, Guide, Howto, Javascript, MOD, PHP, Programming, Shortcode, Tips, Tricks, Weblog, Wordpress
» How To Change WordPress Image Caption Text Style To Superscripts?
» How To Edit And Rewrite Post Slug / Permalink In WordPress 2.5?
» How To Create Image Template File For The Classic WordPress Theme?
» WordPress: Adds wp-caption-text To CSS File For Image Caption Styling
» Update WP_TITLE To Display Blog Name On The Right
» How To Display WordPress EXIF’s Shutter Speed As Fraction?
» Add Shutter Speed, Aperture, EXIF, Or IPTC Data To WordPress Gallery
« GNU Date Generates Consistent UNIX Epoch Time Between Time Zones
» How To Change WordPress Image Caption Text Style To Superscripts?
Intro: WordPress 2.5+ could upload multiple files in one go
Unlike New Blogger image uploader, the WordPress 2.5+ “select files to upload” dialog box works exactly a standard Windows file selection dialog box – press CTRL+A to select all images files; CTRL+Mouse-click to select multiple files; highlight first picture file and press SHIFT key while selecting the last picture file to select all files in between, inclusively.
It’s cool, isn’t it? Not only that. With WordPress 2.5+, you could also use “WordPress Gallery Shortcode” to insert multiple images to the post editor!
As the name suggest, the WordPress Gallery Shortcode is like Linux alias command but it’s pre-defined in WordPress core files (i.e. general user couldn’t redefine the shortcode in the plain/default WordPress admin pages).
However, some WordPress fans is not really keen on the image shortcode for some reasons, e.g. it can’t define which image of the gallery to display or not to display, the sequence of displaying each image in the gallery, etc.
How to insert multiple images in WordPress 2.6.1?
I am using WordPress version 2.6.1 for this topic, but the original trick I’m referring to was suggested by beardedknight in WordPress forum for WordPress 2.5 (so, it supports to work fine for version 2.5+).
- Edit the
wp-admin/includes/media.phpfile (read carefully the path specified here, it’s not wp-includes/media.php or elsewhere – there are at least 3 media.php files in WordPress 2.6.1. installation directory):function media_send_to_editor($html) { ?> <script type="text/javascript"> /* <![CDATA[ */ var win = window.dialogArguments || opener || parent || top; win.send_to_editor('<?php echo addslashes($html); ?>'); /* ]]> */ </script> <?php //exit; return; }
As shown here, look for themedia_send_to_editor($html)function and make little changes, as those highlighted in “blue colour” PHP code:
- remark the original
exit;line - add one single PHP code
return;
- remark the original
- Edit
wp-admin/js/media-upload.js:function send_to_editor(h) { if ( typeof tinyMCE != 'undefined' && ( ed = tinyMCE.activeEditor ) && !ed.isHidden() ) { ed.focus(); if (tinymce.isIE) ed.selection.moveToBookmark(tinymce.EditorManager.activeEditor.windowManager.bookmark); if ( h.indexOf('[caption') != -1 ) h = ed.plugins.wpeditimage._do_shcode(h); ed.execCommand('mceInsertContent', false, h); } else edInsertContent(edCanvas, h); //tb_remove(); }
As shown here, look for thesend_to_editor(h)function and remark the originaltb_remove();function call (the “blue colour” JavaScript code).
If you’re not comfortable with this simple PHP code modification (PHP mod), then just stick to the default behaviour or look for some good WordPress gallery plugin. Good luck.
Howto, Internet, Blog, Guide, Howto, Javascript, MOD, PHP, Programming, Shortcode, Tips, Tricks, Weblog, Wordpress
» How To Change WordPress Image Caption Text Style To Superscripts?
» How To Edit And Rewrite Post Slug / Permalink In WordPress 2.5?
» How To Create Image Template File For The Classic WordPress Theme?
» WordPress: Adds wp-caption-text To CSS File For Image Caption Styling
» Update WP_TITLE To Display Blog Name On The Right
» How To Display WordPress EXIF’s Shutter Speed As Fraction?
» Add Shutter Speed, Aperture, EXIF, Or IPTC Data To WordPress Gallery
Custom Search
![]() |
» How To Change WordPress Image Caption Text Style To Superscripts?

























[...] 2.5+ rewrite the image/file uploader interface to include some most wanted features, e.g. multiple images per single upload, WordPress Gallery Shortcode, image caption text, image size and alignment, etc. Question: How [...]
Okay, this looks promising, but I don’t get what the result of the code change will be.