<?php get_header(); 

	get_template_part('partials/template', 'hero'); 

    $download = get_field('download'); ?>

<section class="page-section main-content-section">
	<div class="container">
				<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>


						<div class="singular-header">
							<div class=" single-header-post-type">
									<?php 
									$postType = get_post_type_object(get_post_type());
									if ($postType) {
									    echo esc_html($postType->labels->all_items);
									}
									?>
							</div>
							<a href="<?php bloginfo('url');?>/construction#updates" class="control control-back inverse icon-arrow-thin-left">
		                        <span>Back</span>
		                    </a>

						</div>

						<h1 class="center-align"><?php the_title(); ?></h1>

						<div class="single-post-feature-image nospace-mobile">
							<?php the_post_thumbnail();?>
						</div>
		<div class="row">

			<div class="col s12 m10 push-m1 l8 push-l2">
						
						<div class="index-content <?php if (isset($download) OR '' !== get_post()->post_content ) { echo ' plain_text'; } ?>">
							<?php the_content(); ?>


						</div>


					<?php if (get_post_type() == "post"): ?>
						<?php comments_template(); ?>
					<?php endif; ?> 

				<?php endwhile; else : ?>
					<p><?php _e( 'Sorry, nothing was found.' ); ?></p>
				<?php endif; ?>

			</div>


		</div> 
	</div>
</section>



<?php get_footer(); ?>