

<!-- Single Page Started
================================================== -->	


<!-- Get Page Header
================================================== -->	
<?php get_header(); ?>



<!-- Page Title Section
================================================== -->	
<?php

	global $prof_default;
	$sentient_breadcrumb_text = __("You are here:  ","sentient");
	if(of_get_option('select_breadcrumb_position',$prof_default) == 'Right') {$breadcrumbPosition = '';} else {$breadcrumbPosition = 'breadcrumb-left';}
?>


<?php if(of_get_option('select_breadcrumb',$prof_default) == 'On'){ ?>
	<div class="homepage-container-design  homepage-container-design-top sentient-page-title-container">
		<div class="homepage-container-design-inner">
			<span class="sentient-page-title-text <?php echo $breadcrumbPosition; ?>"><?php echo get_the_title(); ?></span>
			<span class="sentient-page-breadcrumb-text <?php echo $breadcrumbPosition; ?>"><span class="sentient-page-breadcrumb-text-colored"><?php echo esc_attr($sentient_breadcrumb_text); ?></span><?php sentient_bread_crumbs(); ?></span>
		</div>
	</div>
<?php } ?>

<!-- Single Portfolio Template Started
================================================== -->	

<?php global $prof_default; ?>


<?php if ('portfolio' == get_post_type()){ ?>
<div class="page-main-container single-portfolio">
		
		
		<!-- Portfolio Full Layout Started
		================================================== -->			
		<?php
			if(get_post_meta(get_the_ID(), 'Portfolio Layout', true) == 'full'){
			?>
			
				<!-- Portfolio Controls
				================================================== -->				
				<div class="sentient-portfolio-single-control-container">				
					<?php previous_post_link('%link', '<i class="icon-left-open"></i>') ?>					
					<?php if(of_get_option('portfolio_page_url',$prof_default) != ''){ ?>
						<a href="<?php echo esc_url(of_get_option('portfolio_page_url',$prof_default)); ?>"><i class="icon-layout"></i></a>
					<?php } ?>				
					<?php next_post_link('%link' , '<i class="icon-right-open"></i>') ?>
				</div>
				
				
				<!-- Preparing Data
				================================================== -->					
				<?php
					$slides = get_post_meta( get_the_ID(), 'slider', false );
					$slides = $slides[0];
					$gallery_sentient_class = '';
					foreach ( $slides as $slide ){
						switch ( $slide['type'] ) {				
							case 'thumbnailgallery':
								$gallery_images = $slide['gallery'];

								$output = "<div id='gallery-{$the_id}' class='sentient-gallery-slideshow sentient-gallery-slideshow-play'>";
								$output .= "<ul class='sentient-gallery-list slides'>";
								
								foreach ( $gallery_images as $gallery_image ):
									$attachment_id = $gallery_image['image'];
									$image = wp_get_attachment_image_src( $attachment_id, array(1200,420) );
									$image = $image[0];
									$get_image_url_only = wp_get_attachment_url( $attachment_id );
									$output .= "<li class='gallery-item' data-thumb='{$get_image_url_only}' >";
									$alt = get_post_meta($attachment_id, '_wp_attachment_image_alt', true);
									$output .= "<img src='{$image}' alt='{$alt}' />";
									$output .= "</li>";
								endforeach;

								$output .= "</ul></div>";
								$slideshow = $output;
								$sentient_make_it_gallery = true;
								break;
								
								case 'image':
									$attachment_id = $slide['image'];
									if ( empty( $attachment_id ) )
										continue;
									$image = wp_get_attachment_image_src( $attachment_id, array(1200,420) );
									$image = $image[0];
									/*The style inside img is added by Sentient*/
									$slideshow .= "<li class='project_slide slide-type-image'><div><img  src='{$image}' alt='' /></div></li>";
									break;
								
								case 'gallery':
									$gallery_images = $slide['gallery'];
									$gallery_sentient_class = 'sentient-list-gallery';
									$slideshow = '';
									foreach ( $gallery_images as $gallery_image ){
										$attachment_id = $gallery_image['image'];
										$full_image = wp_get_attachment_image_src( $attachment_id, 'full' );
										$full_image = $full_image[0];
										$slideshow .= "<li><div><img  src='" . $full_image . "' alt='' /></div></li>";
									}
									break;								
						}						
					}				
				?>
				<?php
					if($slideshow == ''){
						if(have_posts()) : while(have_posts()) : the_post(); 
						
							$slideshow = get_the_post_thumbnail( get_the_ID(), 'full');				
							
						endwhile;
						endif;
					}				
				?>
				
				<!-- Image Container
				================================================== -->					
				<div class="sentient-portfolio-single-image-container">
					<div class="sentient-portfolio-single-image-inner-container">
						<?php if($sentient_make_it_gallery){ ?>
							<?php echo $slideshow; ?>
						<?php } elseif($gallery_sentient_class != '') { ?>
							<div class='sentient-gallery-list-images'>
								<ul>
									<?php echo $slideshow; ?>
								</ul>
							</div>					
						
						<?php } else {?>
							<div class='project_flexslider'>
								<ul class='project_slides'>
									<?php echo $slideshow; ?>
								</ul>
							</div>
						<?php }	?>					
					</div>
				</div>
				
				
				<!-- Content Container
				================================================== -->					
				<div class="sentient-portfolio-single-content-container">
					<div class="sentient-portfolio-single-image-inner-container">			
						<?php 
							if(have_posts()) : while(have_posts()) : the_post(); 
							
								the_content();				
								
							endwhile;
							endif;				
						?>			
					</div>
				</div>

			<!-- Portfolio Full Layout End
			================================================== -->		
			
				
				
			<!-- Portfolio Wide Layout Started
			================================================== -->					
			<?php
			} elseif (get_post_meta(get_the_ID(), 'Portfolio Layout', true) == 'wide'){
			?>
			
				<!-- Portfolio Controls
				================================================== -->				
				<div class="sentient-portfolio-single-control-container">				
					<?php previous_post_link('%link', '<i class="icon-left-open"></i>') ?>
					<?php if(of_get_option('portfolio_page_url',$prof_default) != ''){ ?>
						<a href="<?php echo esc_url(of_get_option('portfolio_page_url',$prof_default)); ?>"><i class="icon-layout"></i></a>
					<?php } ?>	
					<?php next_post_link('%link' , '<i class="icon-right-open"></i>') ?>
				</div>
				
				<!-- Preparing Data
				================================================== -->					
				<?php
					$slides = get_post_meta( get_the_ID(), 'slider', false );
					$slides = $slides[0];
					$gallery_sentient_class = '';
					foreach ( $slides as $slide ){
						switch ( $slide['type'] ) {				
							case 'thumbnailgallery':
								$gallery_images = $slide['gallery'];

								$output = "<div id='gallery-{$the_id}' class='sentient-gallery-slideshow sentient-gallery-slideshow-play'>";
								$output .= "<ul class='sentient-gallery-list slides'>";
								
								foreach ( $gallery_images as $gallery_image ):
									$attachment_id = $gallery_image['image'];
									$image = wp_get_attachment_image_src( $attachment_id , 'full');
									$image = $image[0];								
									$get_image_url_only = wp_get_attachment_url( $attachment_id );
									$output .= "<li class='gallery-item' data-thumb='{$get_image_url_only}' >";
									$alt = get_post_meta($attachment_id, '_wp_attachment_image_alt', true);
									$output .= "<img src='{$image}' alt='{$alt}' />";
									$output .= "</li>";
								endforeach;

								$output .= "</ul></div>";
								$slideshow = $output;
								$sentient_make_it_gallery = true;
								break;
								
								case 'image':
									$attachment_id = $slide['image'];
									if ( empty( $attachment_id ) )
										continue;
									$image = wp_get_attachment_image_src( $attachment_id, 'full' );
									$image = $image[0];
									/*The style inside img is added by Sentient*/
									$slideshow .= "<li class='project_slide slide-type-image'><div><img  src='{$image}' alt='' /></div></li>";
									break;

								case 'gallery':
									$gallery_images = $slide['gallery'];
									$gallery_sentient_class = 'sentient-list-gallery';
									$slideshow = '';
									foreach ( $gallery_images as $gallery_image ){
										$attachment_id = $gallery_image['image'];
										$full_image = wp_get_attachment_image_src( $attachment_id, 'full' );
										$full_image = $full_image[0];
										$slideshow .= "<li><div><img  src='" . $full_image . "' alt='' /></div></li>";
									}
									break;									
						}						
					}				
				?>
				<?php
					if($slideshow == ''){
						if(have_posts()) : while(have_posts()) : the_post(); 
						
							$slideshow = get_the_post_thumbnail( get_the_ID(), 'full');				
							
						endwhile;
						endif;
					}				
				?>	
				

				<!-- Image Container
				================================================== -->					
				<div class="sentient-portfolio-single-image-container">
					<?php if($sentient_make_it_gallery){ ?>
						<?php echo $slideshow; ?>
					<?php } elseif($gallery_sentient_class != '') { ?>
						<div class='sentient-gallery-list-images'>
							<ul>
								<?php echo $slideshow; ?>
							</ul>
						</div>					
					
					<?php } else {?>
						<div class='project_flexslider'>
							<ul class='project_slides'>
								<?php echo $slideshow; ?>
							</ul>
						</div>
					<?php }	?>					
				</div>			

				
				<!-- Content Container
				================================================== -->					
				<div class="sentient-portfolio-single-content-container">
					<div class="sentient-portfolio-single-image-inner-container">			
						<?php 
							if(have_posts()) : while(have_posts()) : the_post(); 
							
								the_content();				
								
							endwhile;
							endif;				
						?>			
					</div>
				</div>			
			<!-- Portfolio Wide Layout End
			================================================== -->	



			<!-- Portfolio 2/3 Layout Started
			================================================== -->				
			<?php
			} else {
			?>
			
				<!-- Portfolio Controls
				================================================== -->				
				<div class="sentient-portfolio-single-control-container">				
					<?php previous_post_link('%link', '<i class="icon-left-open"></i>') ?>
					<?php if(of_get_option('portfolio_page_url',$prof_default) != ''){ ?>
						<a href="<?php echo esc_url(of_get_option('portfolio_page_url',$prof_default)); ?>"><i class="icon-layout"></i></a>
					<?php } ?>	
					<?php next_post_link('%link' , '<i class="icon-right-open"></i>') ?>
				</div>

				
				
				<!-- Preparing Data
				================================================== -->					
					<?php
					$slides = get_post_meta( get_the_ID(), 'slider', false );
					$slides = $slides[0];
					foreach ( $slides as $slide ){
						switch ( $slide['type'] ) {				
							case 'thumbnailgallery':
								$gallery_images = $slide['gallery'];

								$output = "<div id='gallery-{$the_id}' class='sentient-gallery-slideshow sentient-gallery-slideshow-play'>";
								$output .= "<ul class='sentient-gallery-list slides'>";
								
								foreach ( $gallery_images as $gallery_image ):
									$attachment_id = $gallery_image['image'];
									$image = wp_get_attachment_image_src( $attachment_id , array(777,660));
									$image = $image[0];								
									$get_image_url_only = wp_get_attachment_url( $attachment_id );
									$output .= "<li class='gallery-item' data-thumb='{$get_image_url_only}' >";
									$alt = get_post_meta($attachment_id, '_wp_attachment_image_alt', true);
									$output .= "<img src='{$image}' alt='{$alt}' />";
									$output .= "</li>";
								endforeach;

								$output .= "</ul></div>";
								$slideshow = $output;
								$sentient_make_it_gallery = true;
								break;
								
								case 'image':
									$attachment_id = $slide['image'];
									if ( empty( $attachment_id ) )
										continue;
									$image = wp_get_attachment_image_src( $attachment_id, array(777,590) );
									$image = $image[0];
									/*The style inside img is added by Sentient*/
									$slideshow .= "<li class='project_slide slide-type-image'><div><img  src='{$image}' alt='' /></div></li>";
									break;
									
								case 'gallery':
									$gallery_images = $slide['gallery'];
									$gallery_sentient_class = 'sentient-list-gallery';
									$slideshow = '';
									foreach ( $gallery_images as $gallery_image ){
										$attachment_id = $gallery_image['image'];
										$full_image = wp_get_attachment_image_src( $attachment_id, 'full' );
										$full_image = $full_image[0];
										$slideshow .= "<li class='item'><div><img  src='" . $full_image . "' alt='' /><i class='fa-plus'></i></div></li>";
									}
									break;									
						}						
					}				
				?>
				<?php
					if($slideshow == ''){
						if(have_posts()) : while(have_posts()) : the_post(); 
						
							$slideshow = get_the_post_thumbnail( get_the_ID(), array(777,590));				
							
						endwhile;
						endif;
					}				
				?>

				<!-- Image and Content Container
				================================================== -->						
				<div class="sentient-portfolio-two-three-layout-container">
					<div class="sentient-portfolio-single-image-inner-container">
						<div class="sentient-portfolio-two-three-layout-left">
							<?php if($sentient_make_it_gallery){ ?>
								<?php echo $slideshow; ?>
							<?php } elseif($gallery_sentient_class != '') { ?>
								<div class='sentient-gallery-list-images'>
									<ul class="slide-type-gallery">
										<?php echo $slideshow; ?>
									</ul>
								</div>					
							
							<?php } else {?>
								<div class='project_flexslider'>
									<ul class='project_slides'>
										<?php echo $slideshow; ?>
									</ul>
								</div>
							<?php }	?>					
						</div>
						<div class="sentient-portfolio-two-three-layout-right">
							<?php 
								if(have_posts()) : while(have_posts()) : the_post(); 
									?>
										<h2 class="title"><a href="<?php esc_url(the_permalink()); ?>"><?php the_title() ?></a></h2>								
									<?php 
									the_content();				
									
								endwhile;
								endif;				
							?>					
						</div>
					</div>
				</div>
			
		<?php } ?>
		<!-- Portfolio 2/3 Layout End
		================================================== -->	
		
		
		<!-- Related Items Container
		================================================== -->
		<?php if(of_get_option('portfolio_related_option',$prof_default) == 'On'){ ?>
		
		<div class="sentient-portfolio-related-items-main-container">
			<div class="sentient-portfolio-related-items-main-container-internal">
				<div class="sentient-portfolio-related-items-title"><?php _e('Related Projects' , 'sentient'); ?></div>
				<div class="sentient-divider-circle"></div>
				<div id="portfolio-wrapper" class="portfolio-wrapper-internal-page sentient-portfolio-four-col">  
					<ul id="portfolio-list">  						
					<?php /* Sentient Related Portfolio's */ ?>
						<?php 
						if(have_posts()) : while(have_posts()) : the_post(); 	
							$category = get_the_category(  $post->ID  );
							if($category[0]->cat_name != 'Uncategorized'){
								$profseparator = ',';
								$profoutput='';
								if($category){
									foreach($category as $profcategory) {
										$profoutput .= $profcategory->name . $profseparator;
									}					
									$profallcategories = trim($profoutput, $profseparator);
								}
						?>	
						<?php
							$paged = get_query_var( 'paged' ) ? get_query_var( 'paged' ) : 1;
							$args =  array ( 'category_name' => $profallcategories, 'paged' => $paged, 'posts_per_page'=> 4, 'post_type'=> 'portfolio' , 'post__not_in'=>array($post->ID));
							$catPosts = new WP_Query($args );
							$mightcounter = 1;
							$proftitlecounter = 1;
							$profhalfColcounter = 1;
							$cat_count = 1;
							?>
							<?php
							if($catPosts->have_posts()){ ?>


							<?php if( $catPosts ) while ($catPosts->have_posts()) : $catPosts->the_post(); ?>

								
								<li class="grid-sizer">
									<div class="sentient-portfolio-four-col-thumb">
										<a href="<?php echo esc_url(the_permalink()); ?>">
											<?php the_post_thumbnail('full' ) ?>
										</a>
										<a href="<?php echo esc_url(the_permalink()); ?>"><i class="fa-plus"></i></a>
									</div>
									<div class="sentient-portfolio-four-col-content-container">
										<div class="sentient-portfolio-four-col-title">
											<a href="<?php echo esc_url(the_permalink()) ?>"><?php the_title() ?></a>
										</div>
										<div class="sentient-portfolio-four-col-categories">
											<?php
												$terms = get_the_terms( get_the_ID() , 'portfolio_category' );  
												$separator = ' . ';
												$output = '';
												if ( $terms && ! is_wp_error( $terms ) ) {   

													foreach ( $terms as $term )   
													{  
														if($cat_count < 3){											
															$output .= '<a href="' . esc_url(get_category_link( $term->term_id )) . '" >' . $term->name . '</a>'.$separator;
														}
														$cat_count = $cat_count + 1;
													} 
													
													echo trim($output, $separator);
													
												} else {   
												   
												}						  										  
											?>	
										</div>	
									</div>				
								</li>
								<?php $cat_count = 1;	?>

								<?php endwhile; wp_reset_postdata(); ?>

						<?php } ?>
					<?php } ?>	
					<?php endwhile; endif; ?>	
					</ul>
				</div>
			</div>
		</div>
		<?php } ?>
</div>
<!-- Single Portfolio Template End
================================================== -->	



<!-- Single Post Template Started
================================================== -->	
<?php } else { ?>

<div class="page-main-container single-page">
	<div class="middle-container">

		<!-- Loop Started
		================================================== -->		
		<?php if(have_posts()) : while(have_posts()) : the_post(); ?>
		<div id="SentientSingleBlogContent" <?php post_class(); ?>>			
			<div class="page-content-container">
			
				<!-- Standard Post Format
				================================================== -->		
				<?php
					if ( get_post_format() == false) {
				?>
					<?php if( has_post_thumbnail()){ ?>
					<div class="single-img-center blog-image-container"><a href="<?php print esc_url(sentient_get_portfolio_thumbnail_url($post->ID)); ?>" ><?php the_post_thumbnail( 'full' ); ?></a></div>
					<?php } ?>
				<?php } ?>
				
				
				<!-- Video Post Format
				================================================== -->						
				<?php
					if ( has_post_format( 'video' ) && get_post_meta(get_the_ID(), 'Post Video URL', true) != '') {
				?>
					<div class="single-img-center blog-image-container blog-video-container"><iframe width="100%" height="450px" src="<?php echo esc_url(get_post_meta(get_the_ID(), 'Post Video URL', true)); ?>"></iframe></div>
				<?php } ?>

				
				<!-- Gallery Post Format
				================================================== -->					
				<?php
					if ( has_post_format( 'gallery' ) && get_post_meta(get_the_ID(), 'Post Gallery Shortcode', true)!= '') { ?>
					<?php
						$galleryvalue = get_post_meta(get_the_ID(), 'Post Gallery Shortcode', true);
						if (strpos($galleryvalue,'slideshow') !== false) {
						?>
							<div class="single-img-center blog-image-container blog-gallery-container">
								<?php
									$newstring = 'gallery putin="blogs" ';
									$oldstring = get_post_meta(get_the_ID(), 'Post Gallery Shortcode', true);
									$gallerycode = str_replace("gallery",$newstring,$oldstring); 	
									echo  do_shortcode($gallerycode);
								?>								
							</div>						
						<?php } else { echo do_shortcode(get_post_meta(get_the_ID(), 'Post Gallery Shortcode', true)); } ?>
				<?php } ?>	

				<!-- Audio Post Format
				================================================== -->					
				<?php
					if ( has_post_format( 'audio' ) && get_post_meta(get_the_ID(), 'Post Audio Shortcode', true)!= '') { ?>
						<div class="single-img-center blog-image-container blog-audio-container sentient-blog-listing-audio-container"><?php echo do_shortcode(get_post_meta(get_the_ID(), 'Post Audio Shortcode', true));  ?></div>
				<?php } ?>	
				<?php 
					$all = __(' Comments', 'my-text-domain');
					$one = __(' Comment', 'my-text-domain');
				?>
				
				<!-- Post Title
				================================================== -->						
				<span class="prof-blog-col-title prof-blog-col-title-single">
					<a href="<?php echo esc_url(the_permalink()); ?>"><?php the_title(); ?></a>
					<?php if ( has_post_format( 'link' )) {  ?>
						<span class="prof-blog-post-title-link"><a href="<?php echo esc_url(get_post_meta(get_the_ID(), 'Link Post URL Value', true)); ?>"><?php echo get_post_meta(get_the_ID(), 'Link Post URL Value', true); ?></a></span>
					<?php } ?>
				</span>
				
				<!-- Date, Comments, Categories and Author 
				================================================== -->					
				<div class="prof-blog-col-icon-container prof-blog-col-icon-container-single">
					<span class="blog-modern-thumb-text-date"><?php echo get_the_time('j') . ' ' . get_the_time('M') . ', ' . get_the_time('Y'); ?></span><span class="sentient-blog-normal-date-seperator">.</span>
					<span class="blog-modern-thumb-text-comments"><?php comments_number( '0 ' . $all, '1 ' . $one, '% ' . $all); ?></span><span class="sentient-blog-normal-date-seperator">.</span>								
					<span class="blog-modern-thumb-text-cat"><?php 
						$categories = get_the_category(get_the_ID());
						$output = '';
						foreach ( $categories as $category ) {
							$output .= $category->name . ', ';
						}
						echo trim($output, ', ');
					?></span><span class="sentient-blog-normal-date-seperator">.</span>								
					<span class="blog-modern-thumb-text-author"><?php echo  _e('Posted By: ','sentient')?><?php the_author(); ?></span>
				</div>				
				
				<!-- Post Content
				================================================== -->						
				<div class="page-content page-single-content <?php if(!has_post_thumbnail()){echo 'page-content-without-image';}?>">
				 <?php the_content(); ?>
				</div>				
				
				<!-- Tags Section
				================================================== -->					
				<?php if(has_tag()){ 
						$sentientTagsWord = __("Tags: " , "sentient");
						the_tags('<div class="sentient-post-single-tags-container">' . $sentientTagsWord . '<div class="sentient-post-single-tags">', ', ', '</div></div>' );			
					}
				?>
				
				
				<!-- Post Social
				================================================== -->						
				<?php
					if(get_post_meta(get_the_ID(), 'Flickr URL', true) != ''){
						$sentient_flickr_slug = __("Flickr" , "sentient");
						$sentient_flickr = '<div class="sentient-social-shortcode-container sentient-social-shortcode-style-two-container sentient-social-flickr sentient-social-shortcode-style-two-first">
							<div class="sentient-header-top-popup-container animated">
								<div class="sentient-header-top-popup">' . $sentient_flickr_slug . '</div>
								<div class="sentient-header-search-pointer-main"><div class="sentient-header-search-pointer">▴</div></div>
							</div>		
							<span class="sentient-header-top-info-flickr"><a href="'. esc_url(get_post_meta(get_the_ID(), 'Flickr URL', true)) .'"><i class="icon-flickr" style="color:#919191;"></i></a></span>
						</div>';
					}else{$sentient_flickr = '';}

					if(get_post_meta(get_the_ID(), 'Vimeo URL', true) != ''){
						$sentient_vimeo_slug = __("Vimeo" , "sentient");					
						$sentient_vimeo = '<div class="sentient-social-shortcode-container sentient-social-shortcode-style-two-container sentient-social-vimeo">
						<div class="sentient-header-top-popup-container animated">
							<div class="sentient-header-top-popup">' . $sentient_vimeo_slug .  '</div>
							<div class="sentient-header-search-pointer-main"><div class="sentient-header-search-pointer">▴</div></div>
						</div>		
							<span class="sentient-header-top-info-vimeo"><a href="'. esc_url(get_post_meta(get_the_ID(), 'Vimeo URL', true)) .'"><i class="icon-vimeo" style="color:#919191;"></i></a></span>
						</div>';
					} else {
						$sentient_vimeo = '';
					}
					
					if(get_post_meta(get_the_ID(), 'Twitter URL', true) != ''){
						$sentient_twitter_slug = __("Twitter" , "sentient");					
						$sentient_twitter = '
							<div class="sentient-social-shortcode-container sentient-social-shortcode-style-two-container sentient-social-twitter">
								<div class="sentient-header-top-popup-container animated">
									<div class="sentient-header-top-popup">' . $sentient_twitter_slug . '</div>
									<div class="sentient-header-search-pointer-main"><div class="sentient-header-search-pointer">▴</div></div>
								</div>		
								<span class="sentient-header-top-info-twitter"><a href="'. esc_url(get_post_meta(get_the_ID(), 'Twitter URL', true)) .'"><i class="icon-twitter" style="color:#919191;"></i></a></span>
							</div>';
					} else {
						$sentient_twitter = '';
					}					
				
				
					if(get_post_meta(get_the_ID(), 'Facebook URL', true) != ''){
						$sentient_facebook_slug = __("Facebook" , "sentient");					
						$sentient_facebook = '
							<div class="sentient-social-shortcode-container sentient-social-shortcode-style-two-container sentient-social-facebook">
								<div class="sentient-header-top-popup-container animated">
									<div class="sentient-header-top-popup">' . $sentient_facebook_slug . '</div>
									<div class="sentient-header-search-pointer-main"><div class="sentient-header-search-pointer">▴</div></div>
								</div>		
								<span class="sentient-header-top-info-facebook"><a href="'. esc_url(get_post_meta(get_the_ID(), 'Facebook URL', true)) .'"><i class="icon-facebook" style="color:#919191;"></i></a></span>
							</div>';
					} else {
						$sentient_facebook = '';
					}					
				
				
					if(get_post_meta(get_the_ID(), 'Dribbble URL', true) != ''){
						$sentient_dribbble_slug = __("Dribbble" , "sentient");					
						$sentient_dribbble = '
							<div class="sentient-social-shortcode-container sentient-social-shortcode-style-two-container sentient-social-dribbble sentient-social-shortcode-style-two-last">
								<div class="sentient-header-top-popup-container animated">
									<div class="sentient-header-top-popup">' . $sentient_dribbble_slug . '</div>
									<div class="sentient-header-search-pointer-main"><div class="sentient-header-search-pointer">▴</div></div>
								</div>		
								<span class="sentient-header-top-info-dribbble"><a href="'. esc_url(get_post_meta(get_the_ID(), 'Dribbble URL', true)) .'"><i class="icon-dribbble" style="color:#919191;"></i></a></span>
							</div>	';
					} else {
						$sentient_dribbble = '';
					}					
			
				
				?>
							
				
				<!-- Display Post Social
				================================================== -->					
				<?php if($sentient_flickr == '' && $sentient_vimeo == '' && $sentient_twitter == '' && $sentient_facebook == '' && $sentient_dribbble == '') { 
					/* Nothing to Display */
				} else {?>
					<div class="sentient-single-social-container">
						<span class="sentient-social-title"><?php _e("Share this Post through:" , "sentient"); ?></span>
						<span class="sentient-social-values">
							<?php echo $sentient_flickr . $sentient_vimeo . $sentient_twitter . $sentient_facebook . $sentient_dribbble;  ?>
						</span>
					</div>	
				<?php } ?>

				
				<!-- Blog Author Section
				================================================== -->					
				<?php if(of_get_option('blog_author_option',$prof_default) == 'On'){ ?>
					<div class="blog-about-author">
						<div class="sentient_vc_separator sentient-inside-seperator">
							<h4><?php _e("About the Author" , "sentient"); ?></h4>	
							<span class="sentient_vc_sep_holder">
								<span class="sentient_vc_sep_line"></span>
							</span>
						</div>					
						<div class="comment-avatar">
							<?php echo get_avatar( get_the_author_meta( 'ID' ), 75 ); ?>
						</div>
						<div class="comment-content-stuff">
							<span class="blog-author"><?php the_author(); ?></span>
							<span class="blog-author-desc"><?php esc_attr(the_author_meta('description')); ?></span>											
						</div>
					</div>																
				<?php } ?>

				
				<!-- Blog Related Posts Section
				================================================== -->					
				<?php if(of_get_option('blog_related_option',$prof_default) == 'On'){ ?>
					<?php 
						$category = get_the_category(  $post->ID  );
						if($category[0]->cat_name != 'Uncategorized'){
							$profseparator = ',';
							$profoutput='';
							if($category){
								foreach($category as $profcategory) {
									$profoutput .= $profcategory->name . $profseparator;
								}					
								$profallcategories = trim($profoutput, $profseparator);
							}
					?>
						<?php
							$type = get_post_type( $post->ID );
							$paged = get_query_var( 'paged' ) ? get_query_var( 'paged' ) : 1;
							$args =  array ( 'category_name' => $profallcategories, 'paged' => $paged, 'posts_per_page'=> 4, 'post_type'=> $type , 'post__not_in'=>array($post->ID));
							$catPosts = new WP_Query($args );
							$mightcounter = 1;
							$proftitlecounter = 1;
							$profhalfColcounter = 1;
							$date_string = __('Posted on : ', 'my-text-domain');
							?>
							<?php
							if($catPosts->have_posts()){ ?>
								<div class="might-also-like-container">
									<div class="post-thumbnail-detailed">
							<?php if( $catPosts ) while ($catPosts->have_posts()) : $catPosts->the_post(); 
								if($proftitlecounter == 1){?>
									<div class="sentient_vc_separator sentient-inside-seperator">
										<h4><?php _e("Related Posts" , "sentient"); ?></h4>	
										<span class="sentient_vc_sep_holder">
											<span class="sentient_vc_sep_line"></span>
										</span>
									</div>
									<div class="home-blogs-modern-container">
								
								<?php } ?>
									<div <?php post_class('home-blogs-modern-item'); ?>>
										<div class="post-detailed-img">
											<?php
												if(get_post_format() == false && has_post_thumbnail()){ ?>
													<span class="sentient-post-related-container">
														<a href="<?php echo esc_url(the_permalink()); ?>"><?php the_post_thumbnail(get_the_ID(), array(150,150) ) ?></a>
														<div class="sentient-header-top-popup-container animated">
															<div class="sentient-header-top-popup"><?php the_title(); ?></div>
															<div class="sentient-header-search-pointer-main"><div class="sentient-header-search-pointer">▴</div></div>
														</div>
													</span>
												<?php } 
												elseif(get_post_format() == false && !has_post_thumbnail()){ ?>
													<span class="sentient-post-related-container sentient-post-related-image">
														<a href="<?php echo esc_url(the_permalink()); ?>"><i class="icon-pencil"></i></a>
														<div class="sentient-header-top-popup-container animated">
															<div class="sentient-header-top-popup"><?php the_title(); ?></div>
															<div class="sentient-header-search-pointer-main"><div class="sentient-header-search-pointer">▴</div></div>
														</div>													
													</span>
												<?php }
												elseif(has_post_format( 'video' )){ ?>
													<span class="sentient-post-related-container sentient-post-related-video">
														<a href="<?php echo esc_url(the_permalink()); ?>"><i class="icon-play"></i></a>
														<div class="sentient-header-top-popup-container animated">
															<div class="sentient-header-top-popup"><?php the_title(); ?></div>
															<div class="sentient-header-search-pointer-main"><div class="sentient-header-search-pointer">▴</div></div>
														</div>													
													</span>	
												<?php }
												elseif(has_post_format( 'audio' )){ ?>
													<span class="sentient-post-related-container sentient-post-related-audio">
														<a href="<?php echo esc_url(the_permalink()); ?>"><i class="fa-volume-off"></i></a>
														<div class="sentient-header-top-popup-container animated">
															<div class="sentient-header-top-popup"><?php the_title(); ?></div>
															<div class="sentient-header-search-pointer-main"><div class="sentient-header-search-pointer">▴</div></div>
														</div>													
													</span>	
												<?php }
												elseif(has_post_format( 'chat' )){ ?>
													<span class="sentient-post-related-container sentient-post-related-chat">
														<a href="<?php echo esc_url(the_permalink()); ?>"><i class="fa-quote-left"></i></a>
														<div class="sentient-header-top-popup-container animated">
															<div class="sentient-header-top-popup"><?php the_title(); ?></div>
															<div class="sentient-header-search-pointer-main"><div class="sentient-header-search-pointer">▴</div></div>
														</div>													
													</span>	
												<?php }
												elseif(has_post_format( 'link' )){ ?>
													<span class="sentient-post-related-container sentient-post-related-link">
														<a href="<?php echo esc_url(the_permalink()); ?>"><i class="icon-link"></i></a>
														<div class="sentient-header-top-popup-container animated">
															<div class="sentient-header-top-popup"><?php the_title(); ?></div>
															<div class="sentient-header-search-pointer-main"><div class="sentient-header-search-pointer">▴</div></div>
														</div>													
													</span>	
												<?php }											
												elseif(has_post_format( 'gallery' )){ ?>
													<span class="sentient-post-related-container sentient-post-related-gallery">
														<a href="<?php echo esc_url(the_permalink()); ?>"><i class="icon-picture"></i></a>
														<div class="sentient-header-top-popup-container animated">
															<div class="sentient-header-top-popup"><?php the_title(); ?></div>
															<div class="sentient-header-search-pointer-main"><div class="sentient-header-search-pointer">▴</div></div>
														</div>													
													</span>		
												<?php }		
											?>
										</div>
									</div>

								<?php $proftitlecounter = $proftitlecounter + 1; endwhile; wp_reset_postdata(); ?>
								</div></div>

								</div>
						<?php } ?>
					
					<?php } ?>				
				<?php } ?>			
				
				
				<!-- Blog Comments Section
				================================================== -->					
				<?php if(comments_open($post->ID )){?> 
				<div id="comments">
					<?php comments_template('', true); ?>
				</div>											
				<?php } ?>
			<div class="prof-wp-links-pages"><?php wp_link_pages(array('before' => '<p>' . __('Pages: ','my-text-domain'),'after'=> '</p>')); ?></div>
			</div>
		</div>
		<?php endwhile; ?>
		<?php endif; ?>

		<!-- Get Page Sidebar
		================================================== -->			
		<div class="sidebar-container">
			<?php get_sidebar(); ?>
		</div>

		</div>
		
<?php } ?>
<!-- Single Post Template End
================================================== -->	



<!-- Get PAge Footer
================================================== -->	
<?php get_footer(); ?>