Skip to content

Instantly share code, notes, and snippets.

@billrobbins
Created February 7, 2014 01:16
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save billrobbins/8855820 to your computer and use it in GitHub Desktop.
Save billrobbins/8855820 to your computer and use it in GitHub Desktop.
<?php
/*
* Template Name: Staff List
*
*
* This file displays the complete
* list of staff members
*
* @package WordPress
* @subpackage United
* @since 1.0.0
*/
get_header(); ?>
<div id="content" class="staff-list">
<?php $loop = new WP_Query( array( 'post_type' => 'staff', 'posts_per_page' => '-1', 'orderby'=>'menu_order', 'order'=>'ASC' ) ); ?>
<?php while ( $loop->have_posts() ) : $loop->the_post(); ?>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<div class="staff-image">
<a href="<?php the_permalink(); ?>"><?php the_post_thumbnail( 'staff-thumbnail' ); ?></a>
<?php get_template_part( 'layouts/staff-details' ); ?>
</div>
<h2 class="title"><a href="<?php the_permalink(); ?>" rel="bookmark"><?php the_title(); ?></a></h2>
<p class="job-title"><?php echo get_post_meta($post->ID, "title", TRUE); ?></p>
</article>
<?php endwhile; ?>
<?php while (have_posts()) : the_post(); ?>
<div class="clearfix">
<h1><?php the_title(); ?></h1>
<?php the_content(); ?>
</div>
<?php endwhile; ?>
</div>
<?php get_footer(); ?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment