/*-----------------------------------------------------------------------------------*/
/* Photos
/*-----------------------------------------------------------------------------------*/
if ( function_exists( 'add_image_size' ) ) {
add_image_size('second_thumb_event', 150, 100, true );
}
function photos() {
$images = get_children(array('post_parent' => get_the_ID(),'post_type' => 'attachment','numberposts' => $qty,'post_mime_type' => 'image',));
$output = '';
foreach( $images as $image ) :
$attachmenturl=wp_get_attachment_url($image->ID);
$attachmentimage=wp_get_attachment_image( $image->ID, 'second_thumb_event' );
if ($src[0]!=$attachmenturl):
$output .= '<a rel="prettyPhoto[gallery]" href="'.$attachmenturl.'" >'.$attachmentimage.'</a>' ;
endif;
endforeach;
return $output;
}
add_shortcode( 'photo_gallery', 'photos' );