<?php
/**
 * The template for displaying all single posts.
 *
 * @package pro
 */

get_header(); ?>
<?php while ( have_posts() ) : the_post(); ?>
	
	
	<div id="page-title-pro" <?php if(get_post_meta($post->ID, 'progression_studios_header_image', true)): ?>style="background-image:url('<?php echo esc_url( get_post_meta($post->ID, 'progression_studios_header_image', true) );?>');"<?php endif; ?>>
		<div class="width-container-pro">
			
			<h1 class="entry-title-pro"><?php the_title(); ?></h1>
			
			<?php 
				$terms = get_the_terms( $post->ID , 'portfolio-category' ); 
				if ( !empty( $terms ) ) :
					echo '<ul class="portfolio-single-tax">';
				foreach ( $terms as $term ) {
					$term_link = get_term_link( $term, 'portfolio-category' );
					if( is_wp_error( $term_link ) )
						continue;
					echo '<li><a href="' . $term_link . '">' . $term->name . '</a></li>';
				} 
				echo '</ul>';
				endif;
			?>
			
			<div class="clearfix-pro"></div>
		</div>
	</div><!-- #page-title-pro -->
	
	
	<div id="content-pro" class="site-content">
		
		<?php get_template_part( 'template-parts/content-single', 'portfolio' ); ?>
		
	</div><!-- #content-pro -->


<?php endwhile; // end of the loop. ?>
<?php get_footer(); ?>