File: /var/www/captainschairit.com/wp-content/themes/captainschare/template-parts/connectors.php
<?php
/**
* Template Name: Connectors Page
*/
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>
<!-- Services -->
<?php $content_part = get_field('content_part'); ?>
<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 $content_part['heading']; ?></h2> -->
<p><?php echo $content_part['content']; ?></p>
</div>
</div>
</div>
</section>
<?php
$args = array(
'posts_per_page' => -1,
'orderby' => 'date',
'order' => 'ASC',
'post_type' => 'cc-connectors',
'post_status' => 'publish',
);
$all_connectors = get_posts( $args );
// echo '<pre>'; print_r ($all_connectors); echo '</pre>';
?>
<section class="gray-bg mb-190">
<div class="container mt-3">
<div class="row my-shuffle">
<?php foreach($all_connectors as $connector) {
$featured_img_url = get_the_post_thumbnail_url($connector->ID,'full'); ?>
<figure class="image-item col-sm-3" data-groups="["PSA"]">
<div class="aspect aspect--16x9 shadow bg-white rounded">
<div class="aspect__inner">
<img src="<?php echo $featured_img_url; ?>" />
</div>
</div>
</figure>
<?php
} ?>
</div>
</div>
</section>
<?php
get_footer();
?>