The built in shortcode doesn’t support that out of the box. However, it’s pretty easy to roll your own “multi-gallery” shortcode like so:
<?php
add_action( 'init', 'wpse36779_add_shortcode' );
/**
* Adds the shortcode
*
* @ uses add_shortcode
*/
function wpse36779_add_shortcode()
{
add_shortcode( 'multigallery', 'wpse36779_shortcode_cb' );
}
/**
* The shortcode callback function
*
* @ uses do_shortcode
*/
function wpse36779_shortcode_cb( $atts )
{
$atts = shortcode_atts(
array(
'id' => false
),
$atts
);
if( ! $atts['id'] )
{
// no list of ids? Just send back a gallery
return do_shortcode( '' );
}
else
{
$ids = array_map( 'trim', explode( ',', $atts['id'] ) );
$out="";
foreach( $ids as $id )
{
if( $id )
$out .= do_shortcode( sprintf( '
', absint( $id ) ) );
}
}
return $out;
}
And of course, despite your best efforts to not use a plugin, here is that mess as a plugin. You could drop that code, minus the plugin header, in your theme’s functions.php
file if you really really really don’t want to use a plugin.