/*
Template Name: Photos
*/
get_header(); ?>
while(have_posts()){ the_post();?>
$current = $post->ID;
$parent = $post->post_parent;
$args = array(
'post_type'=>'page',
'orderby'=>'modified',
'order'=>'DESC',
'post_parent'=>$parent,
'posts_per_page'=>-1
);
$siblings = new WP_Query($args);
if($siblings->have_posts()){?>
} wp_reset_query();
$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');
$adjH = ($i == 1 ?((620/$full[1])*$full[2]):((300/$thumb[1])*$thumb[2]));
?>
;?>)
$first4 = substr(get_the_title(), 0, 4);
if(is_numeric($first4)){?>
echo $first4;?>
}?>
$i++;
}?>
} //endif
wp_reset_query();
}?>
get_footer(); ?>