Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $args = array (
- 'post_type' => 'staff',
- 'tax_query' =>
- array(
- array(
- 'taxonomy' => 'department',
- 'field' => 'slug',
- 'terms' => 'your_department',
- ),
- ),
- );
- $department_query = new WP_Query( $args );
- if ( $department_query->have_posts() ) :
- while ($department_query->have_posts()) : ?>
- <ul class="staffer-archive-list">
- <?php
- $department_query->the_post();
- ?>
- <li>
- <header class="staffer-staff-header">
- <h3 class="staffer-staff-title">
- <a href="<?php the_permalink(); ?>"><?php the_title(); ?></a>
- </h3>
- </header>
- <?php
- the_post_thumbnail ( 'medium', array ('class' => 'alignleft') );
- the_excerpt();
- ?>
- </li>
- <?php
- endwhile;
- endif;
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement