ID, '_kad_post_summery', true ); $crop = true; if( $ascend_portfolio_loop['carousel'] == 'true') { $class = 'portfolio_carousel_item kt-slick-slide p_item'; } else{ $class = 'p_item'; } if ($ascend_portfolio_loop['columns'] == '2') { $itemsize = 'col-xxl-4 col-xl-6 col-md-6 col-sm-6 col-xs-12 col-ss-12'; $image_width = 860; } else if ($ascend_portfolio_loop['columns'] == '1'){ $itemsize = 'col-xxl-12 col-xl-12 col-md-12 col-sm-12 col-xs-12 col-ss-12'; $image_width = 860; } else if ($ascend_portfolio_loop['columns'] == '3'){ $itemsize = 'col-xxl-3 col-xl-4 col-md-4 col-sm-4 col-xs-6 col-ss-12'; $image_width = 600; } else if ($ascend_portfolio_loop['columns'] == '6'){ $itemsize = 'col-xxl-15 col-xl-2 col-md-2 col-sm-3 col-xs-4 col-ss-6'; $image_width = 240; } else if ($ascend_portfolio_loop['columns'] == '5'){ $itemsize = 'col-xxl-2 col-xl-2 col-md-25 col-sm-3 col-xs-4 col-ss-6'; $image_width = 240; } else { $itemsize = 'col-xxl-2 col-xl-25 col-md-3 col-sm-4 col-xs-6 col-ss-12'; $image_width = 300; } if(isset($ascend_portfolio_loop['ratio']) && !empty($ascend_portfolio_loop['ratio'])) { $portfolio_ratio = $ascend_portfolio_loop['ratio']; } else { $portfolio_ratio = 'square'; } if($portfolio_ratio == 'portrait') { $temppimgheight = $image_width * 1.35; $image_height = floor($temppimgheight); } else if($portfolio_ratio == 'landscape') { $temppimgheight = $image_width / 1.35; $image_height = floor($temppimgheight); } else if($portfolio_ratio == 'widelandscape') { $temppimgheight = $image_width / 2; $image_height = floor($temppimgheight); } else if($portfolio_ratio == 'softcrop') { $image_height = null; $crop = false; } else { $image_height = $image_width; } $image_width = apply_filters('ascend_portfolio_grid_image_width', $image_width); $image_height = apply_filters('ascend_portfolio_grid_image_height', $image_height); $terms = get_the_terms( $post->ID, 'portfolio-type' ); if ( $terms && ! is_wp_error( $terms ) ) : $links = array(); foreach ( $terms as $term ) { $links[] = $term->slug; } $tax = join( " ", $links ); else : $tax = ''; endif; ?>
ID, '_kad_image_gallery', true ); $attachments = array_filter( explode( ',', $image_gallery ) ); if (!empty($attachments)) { $img = ascend_get_image_array($image_width, $image_height, $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_array($image_width, $image_height, $crop, null, null, $attachments_posts[0]->ID, true); } else { $img['width'] = $image_width; $img['height'] = $image_width; } } echo '
'; echo '
'; } else { $img = ascend_get_image_array($image_width, $image_height, $crop, null, null, null, true); echo '
'; echo '
'; if( ascend_lazy_load_filter() ) { $image_src_output = 'src="data:image/gif;base64,R0lGODdhAQABAPAAAP///wAAACwAAAAAAQABAEACAkQBADs=" data-lazy-src="'.esc_url($img['src']).'" '; } else { $image_src_output = 'src="'.esc_url($img['src']).'"'; } echo ''.esc_attr($img['alt']).''; echo '
'; echo '
'; } echo '
'; echo '
'; echo '
'; echo ''; echo '
'; if($ascend_portfolio_loop['lightbox'] == 'true') { $light_class = 'portfolio_lightbox'; if($postsummery == 'videolight'){ $video = get_post_meta( $post->ID, '_kad_post_video', true ); if (filter_var($video, FILTER_VALIDATE_URL)) { $light_url = $video; $light_class = 'ktvideolight mfp-iframe'; } else { $light_url = $img['full']; } } else if($postsummery == 'slider') { $light_class = 'kt-no-lightbox portfolio-light-gallery-open'; $light_url = $img['full']; } else { $light_url = $img['full']; } ?>
name; } echo esc_html(implode(' | ', $output)); ?>