<?php
/**
 * Content template for pages
 * @package ninja
 */
?>

<div id="primary" class="content-area">

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

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

		<div id="container">
			
			<div class="content">

				<?php if ( is_front_page() && function_exists('putRevSlider') ): ?>
				<div class="home-slider">
					<?php putRevSlider("home", "home"); ?>
				</div>
				<?php endif; ?>

				<?php
					the_content();
					$group_id = 20;
					$sections = types_render_group($group_id);

					if ( $sections ){
						$output = null;
			            foreach($sections as $section){
			            	$output .= types_render_field($section["slug"], array('output' => 'normal'));
			            }
			            echo $output;
			        }
				?>
			</div><!-- .content -->
		</div><!-- #container -->

	<?php endwhile; else : ?>
		<p><?php _e( 'Sorry, there is nothing here. Perhaps searching might help.' ); ?></p>
		<?php get_search_form(); ?>
	<?php endif; ?>

	</main><!-- #main -->
</div><!-- #primary -->