<?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 may use a
 * different template.
 *
 * @link https://codex.wordpress.org/Template_Hierarchy
 *
 * @package WordPress
 * @subpackage Twenty_Seventeen
 * @since 1.0
 * @version 1.0
 */
$banner_image = get_field('banner_image');
$bimg_style = ($banner_image != '') ? ' style="background-image:url('.$banner_image.');"' : '';
$custom_title = get_field('custom_title');
get_header(); ?>
<div class="middle-section">
	<!-- Banner Section Start -->
    <div class="inner-banner-section clearfix"<?php echo $bimg_style; ?>>
    	<div class="container">
            <div class="caption">
            	<div class="caption-inner">
                	<h1><?php echo ($custom_title != '') ? $custom_title : get_the_title(); ?></h1>
                </div>
            </div>
        </div>
    </div>
	<!-- Banner Section End -->
    <div class="section1-internal entry-content">
    	<div class="container">
	        <?php while(have_posts()) : the_post(); the_content(); endwhile; ?>
        </div>
    </div>
<?php get_footer();