<?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