You need to use custom post and make the categorys there and align the thumbnails in each post.
<?php // query post type */*/
global $post;
$args = array(
'post_type' => 'YOUR-POST-TYPE-HERE',
'cat' => $category,
'suppress_filters' => '0',
'numberposts' =>'-1',
'orderby' => 'title',
'order' => 'asc',
'post_status' => 'publish' );
$myposts = get_posts( $args );
foreach( $myposts as $post ) : setup_postdata($post);
$meta = $custom_metabox_jurister->the_meta();?>
And check if post have thumnail:
<?php // Checks if there is a thumbnail and displays it
if ( has_post_thumbnail() ) {
$size="thumbnail";
$attr = array(
'class' => 'post-logo');
echo '<div class="image">';
echo the_post_thumbnail('large', $attr);
echo '</div>';
}
else{
// Do nothing
}
?>
Change the code , to fit your idea.
Not sure if I understood exactly what you wanted to do. But hope this helps.