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

get_header(); 

$theme_options  = wacko_theme_options();

?>

<div class="content-wrapper">
	<div id="content" class="container">
		<div class="row">

			<?php if( 'left' == $theme_options['sidebar'] ) { ?>

			<section id="primary" class="col-xs-12 col-sm-8 col-md-8 primary-wrapper left-sidebar">

				<?php } elseif( 'no_side' == $theme_options['sidebar'] ) { ?>

				<section id="primary" class="col-xs-12 col-sm-12 col-md-12 primary-wrapper">

					<?php } else { ?>

					<section id="primary" class="col-xs-12 col-sm-8 col-md-8 primary-wrapper">

						<?php } ?>

						<div id="main" class="site-main" role="main">

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

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

								the_post_navigation();

								// 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;

								endwhile; // End of the loop.
							?>

						</div><!--main-->
					</section><!--left-list-wrap-->

				<?php
					get_sidebar(); ?>

				</div><!--row-->
			</div><!--container-->
		</div><!--wrapper-list--> 

	<?php
get_footer();
