';
$image_gallery = get_post_meta( $post->ID, '_kad_image_gallery', true );
$attachments = array_filter( explode( ',', $image_gallery ) );
if (!empty($attachments)) {
$img = ascend_get_image($image_width, $image_height, $image_crop, null, null, $attachments[0], true);
} else {
$attach_args = array('order'=> 'ASC','post_type'=> 'attachment','post_parent'=> $post->ID,'post_mime_type' => 'image','post_status'=> null,'orderby'=> 'menu_order','numberposts'=> -1);
$attachments_posts = get_posts($attach_args);
if(isset($attachments_posts[0]->ID) && !empty($attachments_posts[0]->ID) ) {
$img = ascend_get_image($image_width, $image_height, $image_crop, null, null, $attachments_posts[0]->ID, true);
} else {
$img['width'] = $image_width;
$img['height'] = $image_width;
}
}
ascend_build_slider($post->ID, $image_gallery, $img['width'], $img['height'], 'post', 'kt-slider-same-image-ratio');
echo '';
} elseif($postsummery == 'video') {
echo '';
get_template_part('templates/post', 'video-output');
echo '
';
}?>