Created
September 7, 2015 02:53
-
-
Save kellenmace/dad55b6dbef45da3e171 to your computer and use it in GitHub Desktop.
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 | |
// get all 'staff' post types with a '_hmc_staff_include_on' custom field value of 'executive_committee' | |
$staff = new WP_Query( array ( | |
'post_type' => 'staff', | |
'posts_per_page' => 500, | |
'meta_query' => array( | |
array( | |
'key' => '_hmc_staff_include_on', | |
'value' => '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