This repository has been archived by the owner. It is now read-only.
Permalink
Cannot retrieve contributors at this time
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
hri/page-hri-leadership-grid.php
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
111 lines (63 sloc)
3.49 KB
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
Template Name: HRI Leadership Grid | |
*/ | |
get_header(); ?> | |
<div id="body-container"> | |
<?php if (have_posts()) : while (have_posts()) : the_post(); ?> | |
<div class="custom-span8"> | |
<div class="section-title text-serif"> | |
<?php $key="section-title"; echo get_post_meta($post->ID, $key, true); ?> | |
</div> | |
<h1 class="page-title"><?php the_title(); ?></h1> | |
<hr class="title-hr" /> | |
<div class="span8 no-marg-left"> | |
<div class="post content clearfix" id="post-<?php the_ID(); ?>"> | |
<div class="entry"> | |
<?php the_content('<p class="serif">Read the rest of this page »</p>'); ?> | |
</div> | |
</div> | |
<div class="faculty-staff-container no-marg-left"> | |
<?php | |
$args=array( | |
'post_type' => 'faculty_staff', | |
'category_name' => 'hri-leadership', | |
'post_status' => 'publish', | |
'posts_per_page' => -1, | |
'caller_get_posts'=> 1, | |
'order' => 'ASC' | |
); | |
$my_query = null; | |
$my_query = new WP_Query($args); | |
if( $my_query->have_posts() ) { | |
while ($my_query->have_posts()) : $my_query->the_post(); | |
$page_id = get_the_ID(); | |
$title = get_post_meta($page_id, 'faculty-title', true); | |
$email = get_post_meta($page_id, 'faculty-email', true); | |
$link = get_permalink(); | |
$profile_image = wp_get_attachment_image_src( get_post_thumbnail_id( $page_id ), 'medium' ); | |
$src = $profile_image[0]; | |
echo '<div class="faculty-staff no-marg-left">'; | |
echo '<ul class="faculty-staff-ul">'; | |
echo '<li><div class="faculty-staff-img-crop"><div class="faculty-staff-img-container">'.'<img src="'.$src.'" class="faculty-staff-image"/>'. '</div></div></li>'; | |
echo '<li class="faculty-staff-name">'.get_the_title().'</li>'; | |
echo '<li class="faculty-staff-title">'.$title . '</li>'; | |
echo '<li class="faculty-staff-email"><a href="mailto:'.$email.'">EMAIL</a>'. '</li>'; | |
echo '<li class="faculty-staff-link"><a href="'.$link.'">Read Bio</a></li>'; | |
echo '</ul>'; | |
echo '</div>'; | |
endwhile; | |
} | |
?> | |
</div> | |
<?php endwhile; endif; ?> | |
</div> | |
</div> | |
<div class="sidebar"> | |
<?php $sidebar = get_post_meta($post->ID, 'sidebar-a', true); | |
get_sidebar($sidebar); | |
?> | |
</div> | |
</div> | |
</div> | |
<?php get_footer(); ?> |