<?php
/**
 * The template for displaying all 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.
 *
 * @author Dueper Design
 * @package Dueper Theme
 */

get_header(); ?>

<?php while ( have_posts() ) : the_post(); ?>
  <?php $head_no_pad = get_field('head_no_pad');?>
  <header class="page-header <?php if($head_no_pad) echo 'no-padding';?>">
    <?php the_title('<h1 class="page-title">','</h1>');?>
  </header>
  <?php if( '' !== get_post()->post_content ) :?>
    <div class="container">
      <div class="text-wrapper">
        <?php the_content(); ?>
      </div><!--page-content-->
    </div><!--container-->
  <?php endif; ?>

  <?php get_template_part('inc/flexible-layout/index'); ?>

  <!-- DETACHABLE FIXED NAVIGATION -->
  <?php //get_template_part('inc/flexible-layout/_flex-nav'); ?>

<?php endwhile; ?>
<div class="clearfix"></div>
<?php get_footer(); ?>
