File: /var/www/dev.captainschairit.com/wp-content/themes/captainschare/page.php
<?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.
*
* @package WordPress
* @subpackage Twenty_Sixteen
* @since Twenty Sixteen 1.0
*/
get_header();
$banner_section = get_field('banner_section');
// echo '<pre>'; print_r($banner_section);
global $post;
while (have_posts()): the_post();
$pid = get_the_ID();
$feat_image = wp_get_attachment_url(get_post_thumbnail_id($pid));
// $author_name = get_field( "author_name", $pid ); ?>
<!-- Header -->
<header class="masthead-inner" style="background-image: url(<?php echo ($banner_section['background_image']?$banner_section['background_image']:get_bloginfo('template_directory').'/img/about-bg.jpg') ?>)">
<div class="container">
<div class="row">
<div class="col-sm-12 col-md-12 col-lg-8 offset-lg-2">
<div class="intro-text text-center">
<div class="intro-heading"><?php echo ($banner_section['text']?$banner_section['text']:the_title()) ?></div>
</div>
</div>
</div>
</div>
</header>
<!-- Services -->
<section class="page-section blog-section<?php //(is_woocommerce())?'':'blog-section'; ?>">
<div class="container">
<div class="row">
<!-- <div class="col-lg-10 offset-lg-1 text-center">
<h2 class="heading01 mb-5">Blog</h2>
</div> -->
<div class="blog mb-5 editor-default cart-box">
<div class="col-sm-12">
<!-- <h3 class="heading03"> -->
<?php //echo the_title(); ?>
<!-- </h3> -->
<?php if($feat_image) { ?>
<figure>
<img src="<?php echo $feat_image; ?>" alt="<?php echo the_title(); ?>" class="img-fluid">
</figure>
<?php
}
echo the_content(); ?>
<!-- <a class="btn btn-primary text-uppercase mt-1 hvr-shutter-out-horizontal" href="#">get started</a> -->
</div>
</div>
</div>
</div>
</section>
<?php
endwhile;
get_footer();?>