File: /var/www/captainschairit.com/wp-content/themes/captainschare/template-parts/client-dashboard.php
<?php
/**
* Template Name: Client Dashboard
*/
get_header();
$banner_section = get_field('banner_section');
//echo '<pre>'; print_r($banner_section);
?>
<!-- Header -->
<header class="masthead-inner" style="background-image: url(<?php echo $banner_section['background_image'];?>)">
<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'];?></div>
</div>
</div>
</div>
</div>
</header>
<?php $dashboard_1 = get_field('dashboard_1'); ?>
<!-- Services -->
<section class="page-section" id="clientDashboard">
<div class="container">
<div class="row">
<div class="col-lg-10 offset-lg-1 text-center">
<h2 class="heading01 mb-5"><?php echo $dashboard_1['heading'] ?></h2>
<p><?php echo $dashboard_1['content'] ?></p>
<div class="pt-5 mt-5 laptop-animation">
<div class="destop-browser-bg">
<div class="dashboard-image-blog" style="background-image: url(<?php echo $dashboard_1['image'] ?>);"></div>
</div>
</div>
</div>
</div>
</div>
</section>
<?php $dashboard_2 = get_field('dashboard_2'); ?>
<section class="page-section gray-bg" id="accountManagement">
<div class="container">
<div class="row">
<div class="col-lg-10 offset-lg-1 text-center">
<h2 class="heading01 mb-5"><?php echo $dashboard_2['heading'] ?></h2>
<p><?php echo $dashboard_2['content'] ?></p>
<div class="pt-5 mt-5 laptop-animation">
<div class="destop-browser-bg">
<div class="dashboard-image-blog" style="background-image: url(<?php echo $dashboard_2['image'] ?>);"></div>
</div>
</div>
</div>
</div>
</div>
</section>
<?php
$args = array(
'posts_per_page' => 4,
'orderby' => 'date',
'order' => 'ASC',
'post_type' => 'cc-features',
'post_status' => 'publish',
'meta_query' => array(
'relation' => 'AND',
array(
'key' => 'featured',
'value' => 'featured',
'compare' => 'like',
),
),
);
$features = get_posts( $args );
// echo '<pre>'; print_r ($features); echo '</pre>';
$features_section = get_field('features_section');
?>
<section class="page-section" id="features">
<div class="container">
<div class="row">
<div class="col-lg-12 text-center">
<h2 class="heading01 mb-5"><?php echo $features_section['heading']; ?></h2>
</div>
</div>
<div class="row">
<?php foreach($features as $feature) {
$icon = get_field( "icon", $feature->ID ); ?>
<div class="col-md-6">
<div class="blog-icon">
<div class="icon-set">
<i class="icon <?php echo $icon; ?>"></i>
</div>
<div class="text-content">
<h2 class="service-heading"><?php echo $feature->post_title; ?></h2>
<p class="text-muted"><?php echo $feature->post_content; ?></p>
</div>
</div>
</div>
<?php
} ?>
</div>
</div>
</section>
<?php
get_footer();
?>