Advertisement
thecorkboard

Basic Staff Directory Page Template

Jan 23rd, 2012
233
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.54 KB | None | 0 0
  1. <?php
  2. /*
  3. * Template Name: Staff Directory Listing
  4. * Description ----------- A Page Template listing the content of the staff directory custom post type
  5. * Theme ----------------- Twentyeleven
  6. * Plugin Support -------- Library Custom Post Types
  7. * Plugin URL ------------ http://wordpress.org/extend/plugins/library-custom-post-types/
  8. */
  9.  
  10. get_header(); ?>
  11.  
  12.         <div id="primary">
  13.             <div id="content" role="main">
  14.  
  15.                 <?php $query = new WP_Query( 'post_type=staff_directory' ); ?>
  16.                
  17.                 <?php while ( $query->have_posts() ) : $query->the_post(); ?>
  18.                        
  19.                     <div class="staff_member">
  20.                         <h1 class="staff_member_name"><?php the_title(); ?></h1>
  21.                         <p class="staff_member_title"><?php echo get_post_meta($post->ID, 'directory_position_title', true)?></p>
  22.                         <p class="staff_member_email"><?php echo get_post_meta($post->ID, 'directory_email', true)?></p>
  23.                         <p class="staff_member_phone"><?php echo get_post_meta($post->ID, 'directory_phone', true)?></p>
  24.                         <p class="staff_member_url"><?php echo get_post_meta($post->ID, 'directory_url', true)?></p>
  25.                         <p class="staff_member_address"><?php echo get_post_meta($post->ID, 'directory_address', true)?></p>
  26.                         <p class="staff_member_bio"><?php echo get_post_meta($post->ID, 'directory_bio', true)?></p>
  27.                         <p class="staff_member_photo"><?php echo get_post_meta($post->ID, 'directory_photo', true)?></p>
  28.                     </div>
  29.  
  30.                 <?php endwhile; // end of the loop. ?>
  31.  
  32.                 <?php wp_reset_postdata(); ?>
  33.  
  34.             </div><!-- #content -->
  35.         </div><!-- #primary -->
  36.  
  37. <?php get_footer(); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement