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?
clas/page-new-faculty-list.php
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
91 lines (64 sloc)
2.54 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: New Faculty List | |
*/ | |
get_header(); ?> | |
<?php if (is_category()) { $posts = query_posts($query_string . '&meta_key=new-faculty-last-name&orderby=meta_value'); } ?> | |
<?php if (have_posts()) : while (have_posts()) : the_post(); ?> | |
<div id="home-interior"> | |
<div class="row" id="row1"> | |
<div class="page-title clear"> | |
<h1><?php the_title(); ?></h1> | |
</div> | |
<div class="interior-hero clear"> | |
<?php the_post_thumbnail(); ?> | |
</div> | |
<div class="no-hero"></div> | |
</div> | |
<div class="row" id="row2"> | |
<div class="span12 no-marg"> | |
<?php the_content('<p class="serif">Read the rest of this page »</p>'); ?> | |
</div> | |
</div> | |
<br /> | |
<div class="row" id="row1"> | |
<?php | |
$args=array( | |
'post_type' => 'new_faculty', | |
'post_status' => 'publish', | |
'posts_per_page' => -1, | |
'caller_get_posts'=> 1, | |
'meta_key' => 'new-faculty-last-name', | |
'orderby' => 'meta_value', | |
'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, 'new-faculty-title', true); | |
$email = get_post_meta($page_id, 'new-faculty-email', true); | |
$content = get_post($page_id); | |
$profile_image = wp_get_attachment_image_src( get_post_thumbnail_id( $page_id ), 'thumbnail' ); | |
$src = $profile_image[0]; | |
echo '<div class="row no-marg clear">'; | |
echo '<div class="span5">'; | |
echo '<ul class="new-faculty-ul">'; | |
echo '<li>'.'<img src="'.$src.'" class="new-faculty-image"/>'. '</li>'; | |
echo '<li class="new-faculty-name">'.get_the_title().'</li>'; | |
echo '<li class="new-faculty-title">'.$title . '</li>'; | |
echo '<li class="new-faculty-email">'.'<strong>Email:</strong> '.'<a href="mailto:'.$email.'">'.$email.'</a>'. '</li>'; echo '</ul>'; | |
echo '</div>'; | |
echo '<div class="span6">'; | |
echo $content->post_content ; | |
echo '</div>'; | |
echo '</div>'; | |
echo '<hr class="new-faculty-hr" />'; | |
endwhile; | |
} | |
?> | |
</div> | |
<?php endwhile; endif; ?> | |
</div> | |
<?php get_footer(); ?> |