I am using Scribu's Posts 2 Posts plugin to connect posts with small galleries attached to an album post type. Everything works great, except that I cannot figure out how to merge the attachments to display together.
Right now I am using the code below to display each gallery one below another.
$images = get_children( array(
'post_parent' => $post->ID,
'post_type' => 'attachment',
'post_mime_type' => 'image',
'orderby' => 'menu_order',
'order' => 'ASC',
'numberposts' => 999 ) );
if ( $images ) {
$total_images = count( $images );
$image = array_shift( $images );
$image_img_tag = wp_get_attachment_image( $image->ID, 'thumbnail', $default_attr );
}
if ($images)
echo do_shortcode('[gallery size="small" columns="5"]');
Is it possible to grab all of the post attachments connect to an album and combine before this script is run?