term_id ).'" data="' . esc_attr( sprintf( __( "View all posts in %s", "jozoorthemes" ), $category->name ) ) . '">'.$category->cat_name.''.$separator;
}
echo trim($output, $separator);
}
?>
ID); // Get All of the Data at Once
if(isset($post_meta_data['customposts_post_format'])) {$post_format = $post_meta_data['customposts_post_format'][0];} else { $post_format = 'image';} // Project Format
if(isset($post_meta_data['customposts_post_video'])) {$video_url = $post_meta_data['customposts_post_video'][0];} else { $video_url = '';} // Video URL
if(isset($post_meta_data['customposts_post_soundcloud'])) {$soundcloud_code = $post_meta_data['customposts_post_soundcloud'][0];} else { $soundcloud_code = '';} // SoundCloud Url
// get custom_repeatable for portfolio
$post_meta_data2 = get_post_meta( $post->ID, 'images', true );
// get post thumbnail
if (has_post_thumbnail( $post->ID ) ):
$image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'single-post-thumbnail' );
$feautured_image = $image[0];
endif;
$permalink_post = get_permalink(); //permalink
//$post_title_alt = the_title(); // post title
// check for Post Format
if($post_format == 'slider') {
if(empty($post_meta_data2) && !has_post_thumbnail( $post->ID ) ){
$postformat = '';
}
else {
$postformat = '
';
foreach ( (array) $post_meta_data2 as $meta) {
if(empty($meta['image'])){ $meta['image'] = $feautured_image ;}
$postformat .= '
';
}
$postformat .= '
';
}
}
elseif($post_format == 'video') {
if(empty($video_url) && !has_post_thumbnail( $post->ID ) ){
$postformat = '';
}
else {
if(isset($video_url)) {$string = $video_url; } else { $string = ''; }
if ( strpos($string, 'youtube') !== false )
{
// youtube video
$video_file = '
';
}
elseif ( strpos($string, 'vimeo') !== false )
{
// vimeo video
$video_file = '
';
}
else {
if(isset($feautured_image)) { $feautured_image = $feautured_image; } else { $feautured_image = '';}
// image type
$video_file = '

';
}
$postformat = '
'.$video_file.'
';
}
}
elseif($post_format == 'soundcloud') {
if(empty($soundcloud_code) && !has_post_thumbnail( $post->ID ) ){
$postformat = '';
}
else {
if(!empty($soundcloud_code)) {
$soundcloud_final = $soundcloud_code;
}
else {
if(isset($feautured_image)) { $feautured_image = $feautured_image; } else { $feautured_image = '';}
// image type
$soundcloud_final = '

';
}
$postformat = '
'.$soundcloud_final.'
';
}
}
elseif($post_format == 'image') {
if (has_post_thumbnail( $post->ID ) ) {
$postformat = '
';
}
else {
$postformat = '';
}
}
?>
'.__("Edit This Post", "jozoorthemes").' ]','',''); ?>
ID);
if ($tags) {
$tag_ids = array();
foreach($tags as $individual_tag) $tag_ids[] = $individual_tag->term_id;
$args=array(
'tag__in' => $tag_ids,
'post__not_in' => array($post->ID),
'post_type' => 'post',
'posts_per_page'=>4, // Number of related posts to display.
'orderby' => 'rand',
'ignore_sticky_posts'=>1
);
$my_query = new wp_query( $args );
if( $my_query->have_posts() ) {
?>
have_posts() ) {
$my_query->the_post();
// get post thumbnail
if (has_post_thumbnail( $post->ID ) ):
$image = wp_get_attachment_thumb_url( get_post_thumbnail_id( $post->ID ), 'related-posts-thumbnail' );
//$feautured_image = $image[0];
$feautured_image = $image;
endif;
?>
-
ID ) ) {?>