';
$sideoutput .= '
';
}else{
$sideoutput .='Please Setting Portfolio in Appearance->Theme Options->Portfolio.';
}
echo $sideoutput;
if(count($approvedcatID)>0){
?>
- ';
$sideoutput .= '
- '.__('All Categories','klasik').' '; foreach ($categories as $key) { $catname = get_term($key,"portfolio-category"); $sideoutput .= '
- '.$catname->name.' '; $approvedcatID[] = $key; } $sideoutput .= '
'pdetail',
'showposts' => -1,
'orderby' => 'date',
'paged' => $paged,
'tax_query' => array(
array(
'taxonomy' => 'portfolio-category',
'field' => 'id',
'terms' => $approvedcatID
)
)
);
query_posts($qryargs);
while ( have_posts() ) : the_post();
$custom = get_post_custom($post->ID);
$cf_thumb = (isset($custom["klasik_thumb"][0]))? $custom["klasik_thumb"][0] : "";
$cf_lightbox = (isset($custom["klasik_lightbox"][0]))? $custom["klasik_lightbox"][0] : "";
$cf_externallink = (isset($custom["klasik_link"][0]))? $custom["klasik_link"][0] : "";
//get post-thumbnail attachment
$attachments = get_children( array(
'post_parent' => $post->ID,
'post_type' => 'attachment',
'orderby' => 'menu_order',
'post_mime_type' => 'image')
);
foreach ( $attachments as $att_id => $attachment ) {
$getimage = wp_get_attachment_image_src($att_id, 'thumb-portfolio', true);
$portfolioimage = $getimage[0];
$cf_thumb2 ='';
}
//thumb image
if($cf_thumb!=""){
$cf_thumb = '';
}elseif(has_post_thumbnail($post->ID)){
$cf_thumb = get_the_post_thumbnail($post->ID, 'thumb-portfolio');
}else{
$cf_thumb = $cf_thumb2;
}
$ids = get_the_ID();
$catinfos = get_the_terms($post->ID,'portfolio-category');
$key = "";
if($catinfos){
foreach($catinfos as $catinfo){
$key .= " ".$catinfo->slug;
}
$key = trim($key);
}
?>
';
if($cf_externallink!=""){
$output .='';
$output .= '';
$output .= '';
$output .= $cf_thumb;
$output .='';
}elseif($cf_lightbox!=""){
$output .='';
$output .= '';
$output .= '';
$output .= $cf_thumb;
$output .='';
}else{
$output .='';
$output .= '';
$output .= '';
$output .= $cf_thumb;
$output .='';
}
$output.='
';
$output.='';
}
if($disabledesc!=true || $disabletitle!=true){
$output.='';
if($disabletitle!=true){
$output .='
';
}
$output .='';
echo $output;
?>
'; $output .=''.get_the_title().''; $output .='
'; } if($disabledesc!=true){ $excerpt = get_the_excerpt(); $output .=''.klasik_string_limit_char($excerpt,$longdesc).'
';
}
$output .= ''.__('Read More →', 'klasik').'';
$output.='