/*
Template Name: Photos
*/
get_header(); ?>
while(have_posts()){ the_post();
$current = $post->ID;
$parent = $post->post_parent;
$imgID = $post->post_parent===0 ? $current : $parent;
?>
$imageargs = array (
'post_type' => 'attachment',
'post_mime_type' => 'image',
'posts_per_page' => -1,
'post_status'=> 'any',
'post_parent' => $post->ID,
'orderby' => 'menu_order',
'order' => 'ASC',
'post__not_in' => array(get_post_thumbnail_id())
);
$images = new WP_Query($imageargs);
if ($images->have_posts()) {
?>
$i = 0;
while($images->have_posts()) { $images->the_post();
$thumb = wp_get_attachment_image_src( $post->ID, 'medium');
$full = wp_get_attachment_image_src( $post->ID, 'full');
?>
$i++;
}?>
} //endif
wp_reset_query();
}//endwhile original query
?>
get_footer(); ?>