<?php
/**
* The template for displaying pages
*
* This is the template that displays all pages by default.
* Please note that this is the WordPress construct of pages and that
* other "pages" on your WordPress site will use a different template.
*/
get_header(); ?>
<?php while ( have_posts() ) : the_post(); ?>
<?php $backgroundImg = wp_get_attachment_image_src( get_post_thumbnail_id($post->ID), 'full' ); ?>
  <section class="page-hero" id="start-content" data-type="background" data-speed="10" id="section1" style="background: url('<?php echo $backgroundImg[0]; ?>') no-repeat;">
    <div class="container">
      <div class="row">
	  <div class="col-12 text-center text-white">
	  <?php the_title( '<h1 class="entry-title"><strong>', '</strong></h1>' ); ?>
      <?php if ( function_exists('yoast_breadcrumb') )
      {yoast_breadcrumb('<p id="breadcrumbs">','</p>');} ?>
    </div>
	</div>
	</div>
  </section>

  <main>
    <section class="page-content" data-type="background" data-speed="10">
      <div class="container">
        <div id="page" role="main">
          <div class="row">
            <article class="col-md-12" <?php post_class('main-content') ?> id="post-<?php the_ID(); ?>">
              <div class="entry-content">
                <?php the_content(); ?>
                <?php edit_post_link(); ?>
              </div>
            </article>
          </div>
        </div>
      </div>
    </section>
  </main>
<?php endwhile;?>
<?php get_template_part('template-parts/recent-post-section'); ?>
<?php get_footer(); ?>
