RC
// WP_Query arguments
$args = array(
'post_type' => array( 'resource_center' ),
'post_status' => array( 'publish' ),
'nopaging' => true,
'posts_per_page' => '-1',
'order' => 'DESC',
'orderby' => 'date',
'meta_query' => array(
'relation' => 'AND',
array(
'key' => 'resource_private',
'value' => '1',
'compare' => '!=',
'type' => 'NUMERIC',
),
array(
'key' => 'resource_featured',
'compare' => 'EXISTS',
'type' => 'NUMERIC',
),
),
);
// The Query
$posts = new WP_Query( $args );
// The Loop
if ( $posts->have_posts() ) {
while ( $posts->have_posts() ) {
$posts->the_post();
// do something
}
} else {
// no posts found
}
// Restore original Post Data
wp_reset_postdata();