<?php
/**
 * Page template.
 *
 * @package EasySite_Pro
 */

get_header();
?>

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

	<?php if ( easysite_page_uses_builder() || easysite_ve_active() ) : ?>
		<article <?php post_class( 'easysite-page easysite-page-builder-active' ); ?>>
			<?php easysite_render_page_builder( get_the_ID() ); ?>
		</article>
	<?php else : ?>
		<div class="easysite-container easysite-content-area">
			<article <?php post_class( 'easysite-page' ); ?>>
				<header class="easysite-entry-header">
					<?php the_title( '<h1 class="easysite-entry-title">', '</h1>' ); ?>
				</header>
				<div class="easysite-entry-content">
					<?php the_content(); ?>
				</div>
				<?php easysite_social_share_buttons(); ?>
			</article>
		</div>
	<?php endif; ?>

<?php endwhile; ?>

<?php
get_footer();
