Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
// 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(
'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;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.