<?php
/**
 * The template for displaying all single posts
 *
 * @link https://developer.wordpress.org/themes/basics/template-hierarchy/#single-post
 *
 * @package Code_Manas
 */

get_header();
?>

	<main id="main" class="site-main" role="main">
		<div id="content" class="site-content">
			<div class="container">
				<div id="primary" class="content-area">
					<div class="primary-inner-wrapper">

					<?php
					while ( have_posts() ) :
						the_post();

						get_template_part( 'template-parts/content', get_post_type() );


					endwhile; // End of the loop.
					?>

					</div><!--primary content area-->
				<?php 
				$post_pagination = get_theme_mod( 'post_pagination', 'enable' ); 

				if ( 'enable' === $post_pagination ) {
					the_post_navigation();
				}

				if( get_theme_mod( 'post_comment_enable', 1 ) ) {
					// If comments are open or we have at least one comment, load up the comment template.
					if ( comments_open() || get_comments_number() ) :
						comments_template();
					endif;
				}
				?>
				</div>
				<?php get_sidebar(); ?>
			</div>
		</div>
	</main>

<?php
get_footer();
