<?php
/**
 * Theme Name: 		Noisa
 * Theme Author: 	Mariusz Rek - Rascals Themes
 * Theme URI: 		http://rascalsthemes.com/noisa
 * Author URI: 		http://rascalsthemes.com
 * File:			page.php
 * @package noisa
 * @since 1.0.0
 */

get_header();

// Get options
$noisa_opts = noisa_opts();

// Get layout
$noisa_layout = get_post_meta( $wp_query->post->ID, '_layout', true );
$noisa_layout = isset( $noisa_layout ) && $noisa_layout !== '' ? $noisa_layout = $noisa_layout : $noisa_layout = 'wide';

// Get Custom Intro Section
get_template_part( 'inc/custom-intro' );

?>
<div id="content" class="<?php echo esc_attr( $noisa_layout ) ?>">

	<div class="container clearfix">

		<div role="main" class="main <?php echo esc_attr( $noisa_layout ) ?>">
			<?php
			// Start the Loop.
			while ( have_posts() ) : the_post();

				// Include the page content template.
				get_template_part( 'content', 'page' );

			endwhile;
			?>
		</div>
		<!-- .main -->
		<?php if ( $noisa_layout !== 'wide' && $noisa_layout !== 'thin' && $noisa_layout !== 'vc' ) : ?>
			<?php get_sidebar( 'custom' ); ?>
		<?php endif; ?>
	</div>
    <!-- .container -->
</div>
<!-- #content -->

<!-- Comments -->
<?php
// If comments are open or we have at least one comment, load up the comment template.
if ( comments_open() || get_comments_number() ) {
	comments_template();
	
}
get_footer();