File: /home/awaldron/_domains/pennhillscdc.org/wp-content/themes/phcdc/page-templates/board.php
<?php
/**
* Template Name: Board of Directors
*
* Template for displaying a page without sidebar even if a sidebar widget is published.
*
* @package understrap
*/
// Exit if accessed directly.
defined( 'ABSPATH' ) || exit;
get_header();
$container = get_theme_mod( 'understrap_container_type' );
$board = get_posts(array(
'post_type' => 'board',
'orderby' => 'menu_order',
'order' => 'ASC',
'posts_per_page' => -1
));
?>
<div class="sub-image" style="background-image: url(<?php echo get_the_post_thumbnail_url( $post->ID, 'full' ); ?>)">
<div class="container">
<div class="row">
<div class="col-sm-12 text-center"></div>
</div>
</div>
</div>
<div class="wrapper" id="full-width-page-wrapper">
<div class="<?php echo esc_attr( $container ); ?>" id="content">
<div class="row">
<div class="col-md-10 offset-1 content-area" id="primary">
<main class="site-main" id="main" role="main">
<header class="entry-header">
<h1 class="entry-title">Board of Directors</h1>
</header>
<p>Meet the board of the Penn Hills Community Development Corporation.</p>
<?php foreach ($board as $bm): ?>
<div class="board-member">
<div class="bm-image"><img src="<?=get_the_post_thumbnail_url( $bm->ID, 'full' )?>" /></div>
<div class="bm-content">
<?php echo $bm->post_content; ?>
</div>
</div>
<?php endforeach; ?>
</main><!-- #main -->
</div><!-- #primary -->
</div><!-- .row end -->
</div><!-- #content -->
</div><!-- #full-width-page-wrapper -->
<?php get_footer(); ?>