sb_schoolpergem
// WP_Query arguments
$args = array(
'post_type' => array( 'sb_school' ),
'tax_query' => array(
array(
'taxonomy' => 'sb_membership',
'terms' => '2020-2021',
'field' => 'slug',
),
),
'meta_query' => array(
array(
'key' => 'sch-postcode',
'compare' => 'IN',
),
),
);
// The Query
$scholen_01 = new WP_Query( $args );
// The Loop
if ( $scholen_01->have_posts() ) {
while ( $scholen_01->have_posts() ) {
$scholen_01->the_post();
// do something
}
} else {
// no posts found
}
// Restore original Post Data
wp_reset_postdata();