Permalink
Cannot retrieve contributors at this time
neag/single-person.php
Go to file<?php | |
/** | |
* Used for displaying the 'person' post type in NEAG. | |
*/ | |
get_header(); ?> | |
<?php include(get_template_directory() . '/inc/sidebar-check.php'); // get_template_directory returns parent theme directory?> | |
<div id="page-page"> | |
<?php if (have_posts()) : while ( have_posts() ) : the_post(); ?> | |
<?php include(get_template_directory() . '/inc/submenu-check.php') ?> | |
<div class="row"> | |
<div class="col-sm-<?php echo (is_active_sidebar( $sidebar )?9:12); ?>"> | |
<div id="primary" class="content-area subpage"> | |
<main id="main" class="site-main" role="main"> | |
<div class="row"> | |
<?php | |
$about = get_field('about'); | |
if (strlen($about) > 0){ | |
//include(get_template_directory() . '/inc/person-with-about.php'); | |
?> | |
<div class="col-sm-8"> | |
<h1> | |
<?php | |
the_field('first_name'); | |
echo ' '; | |
if (get_field('middle_name')){ | |
the_field('middle_name'); | |
echo ' '; | |
}; | |
the_field('field_last_name'); | |
?></h1> | |
<?php | |
$titlePieces = explode(";", get_field('title')); | |
foreach( $titlePieces as $t ){ | |
echo ( !empty($t) ? '<p class="text-muted">'.$t.'</p>': '' ); | |
} | |
$expertise = get_field('expertise'); | |
if( $expertise ){ | |
echo "<p class='text-muted'><span class='person-expertise'>Expertise:</span> {$expertise}</p>"; | |
} | |
$departmentPieces = explode(";", get_field('department')); | |
foreach( $departmentPieces as $d ){ | |
echo ( !empty($d) ? '<p class="text-muted">'.$d.'</p>': '' ); | |
} | |
?> | |
<hr/> | |
<?php the_field('about'); ?> | |
</div> | |
<div class="col-sm-4"> | |
<?php if(get_the_post_thumbnail()){ | |
echo '<div class="person-thumbnail">'; | |
the_post_thumbnail(); | |
echo '</div>'; | |
};?> | |
<div> | |
<?php include(get_template_directory() . '/inc/person-info.php'); ?> | |
</div> | |
</div> | |
<?php | |
} else { | |
//include(get_template_directory() . '/inc/person-no-about.php'); | |
?> | |
<div class="col-sm-2 col-sm-offset-2"> | |
<?php if(get_the_post_thumbnail()){ | |
echo '<div class="person-thumbnail">'; | |
the_post_thumbnail(); | |
echo '</div>'; | |
};?> | |
</div> | |
<div class="col-sm-6"> | |
<h1> | |
<?php | |
the_field('first_name'); | |
echo ' '; | |
if (get_field('middle_name')){ | |
the_field('middle_name'); | |
echo ' '; | |
}; | |
the_field('field_last_name'); | |
?></h1> | |
<?php | |
$titlePieces = explode(";", get_field('title')); | |
foreach( $titlePieces as $t ){ | |
echo ( !empty($t) ? '<p class="text-muted">'.$t.'</p>': '' ); | |
} | |
$expertise = get_field('expertise'); | |
if( $expertise ){ | |
echo "<p class='text-muted exper'><span class='person-expertise'>Expertise:</span> {$expertise}</p>"; | |
} | |
$departmentPieces = explode(";", get_field('department')); | |
foreach( $departmentPieces as $d ){ | |
echo ( !empty($d) ? '<p class="text-muted">'.$d.'</p>': '' ); | |
} | |
?> | |
<?php include(get_template_directory() . '/inc/person-info.php'); ?> | |
</div> | |
<?php | |
} | |
?> | |
</div> | |
</main> | |
</div> | |
</div> | |
<?php include('inc/sidebar-if-active.php')?> | |
</div> | |
<?php include(get_template_directory() . '/inc/submenu-closing-tags.php')?> | |
<?php endwhile; endif; // end of the loop. ?> | |
</div> | |
<?php get_footer(); ?> |