Multiple Galleries per Post/Page
Ever wanted to have multiple galleries on the same post or page? Currently most of the solutions require you to manually edit gallery shortcode and add something like include="img_id_1 img_id2". Luckily, WordPress 2.9 will have this include/exclude feature built in core, but you still don’t have an easy way to select images which to include or to insert multiple galleries.
Therefore, I created a plugin called Multiple Galleries which adds checkboxes next to images in the Insert Gallery window which makes selecting images to be included in galleries fast and easy. If no checkbox is selected, all images are included.
I created this plugin because I am designing a new WordPress theme for designers, artists, architects and all of the creative types where the ability to have multiple galleries per portfolio entry is very important.

Creative Commons Attribution-Noncommercial-Share Alike License
GNU GPL
How about extending this plugin so that it also supports inserting a gallery from the media Library?
I’d be very interested as i.e. I need to insert a gallery into two different places and that is quite difficult, ex. insert a gallery into a post and a page…
ovidiu, thanks for the excellent suggestion. I have been struggling with the same problem myself.
I am thinking of a drop-down menu of all posts that have galleries and automatic generation of [gallery id="n"] upon selecting ‘Insert gallery from another post’.
Kaspars, perfect :-) I am glad you like the suggestion. Looking forward to it.
Awesome! Thanks.
Have you tested this in WP2.9? I’m having some difficulties re-ordering my gallery sort order with this plugin enabled.
2.9.1 here and the galleries aren’t showing up.
I’m getting code like this:
[gallery link="file" columns="2" include=" 408 407"] but nothing appears. Thoughts? I really want to get this to work… Thanks
the problem regarding my post above, I’ve discovered, is that the format SHOULD be include=”408,407″ so I’m going to see if I can edit the plugin to remove the spaces and get the commas back…
booobooooo, thanks for figuring this out — it must have changed with the 2.9 release. I’ll fix this in the next release of the plugin.
In the meantime you could change (in
multiple-galleries.js):$to_include += ' ' + $imgid;to:
$to_include += $imgid + ', ';Nice! although I think you mean:
$to_include += $imgid + ','because you don’t want any spaces in there at all.
Also, when you do another version of the plugin you might want to try to see if you can get it to leave off the last comma since I can see that causing a problem, although I haven’t seen one yet.
One other thing: I’ve noticed that the checkboxes don’t appear when the post editor is in HTML mode. Is that really the caes or am I crazy?
booobooooo, I think the extra spacing isn’t an issue; I’ll definitely fix the extra comma, though.
It doesn’t work in HTML mode because there is no way of knowing which gallery you have selected (if there are several within the post). In WYSIWYG mode you select the gallery placeholder, which javascript can detect.
Gotcha. Just tested it and you’re right about the space after the comma not being a problem.
It would be nice to be able to create new galleries in HTML mode, but it’s not a big deal compared to how cool the plug-in is otherwise! Great work!
upsss, now is working… I forgot to restart Firefox after changing javascript.
Works great!
Thanks again kaspars!