<?php
/**
 * The template for displaying all pages
 * @link https://codex.wordpress.org/Template_Hierarchy
 * @since 1.0
 * @package evaWp
 */
get_header();?>
<div class="container" id="site-content">
	<?php do_action( 'evawp_page_before_main_content' ); ?>
	<div class="row">
		<div class="<?php echo esc_attr( evawp_is_sidebar_active() ? 'col-md-8 col-lg-8' : 'col-md-12' ); ?> content-wrapper">
			<?php do_action( 'evawp_page_before_content' ); ?>
			<main id="main" class="site-main ">
				<?php if ( have_posts() ): ?>
					<div class="row" id="evawp-main-content">
						<?php
						# Load posts loop.
						while ( have_posts() ) : the_post(); 
						?>
							<div class="evaWp-single-content">
								<?php if( has_post_thumbnail() ): ?>
									<div class="evawp-single-thumbnail">
										<?php the_post_thumbnail( 'full' ); ?>
									</div>
								<?php endif; ?>
								<?php 
									the_content();
									evawp_content_navigation();
								?>
							</div>
						<?php endwhile; ?>
					</div>					
				<?php endif; ?>	
			</main>
		</div>
		<?php if( evawp_is_sidebar_active() ):?>
			<div class="col-md-4 col-lg-4 sidebar-wrapper">
				<?php get_sidebar(); ?>
			</div>
		<?php endif; ?>
	<?php do_action( 'evawp_page_after_main_content' ); ?>
	</div>	
</div>
<?php get_footer() ?>