<?php | |
// get all 'staff' post types with a taxonomy term of 'executive_committee' | |
$staff = new WP_Query( array ( | |
'post_type' => 'staff', | |
'posts_per_page' => 500, | |
'tax_query' => array( | |
array( | |
'taxonomy' => 'include_staff_on_page', | |
'field' => 'slug', | |
'terms' => 'executive_committee', | |
), | |
), | |
) ); | |
if ( $staff->have_posts() ) : while ( $staff->have_posts() ) : $staff->the_post(); | |
get_template_part( 'partials/content', 'staff-listing' ); | |
endwhile; endif; | |
wp_reset_postdata(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment