We’ll use same code as shown in this post to find all posts with a specific custom field value.
That is same as getting ACF values from custom post type.
This following example has complete code with WP_Query too.
-1,
'post_type' => 'guest_posts',
'meta_query' => array(
'relation' => 'AND',
array(
'key' => 'blog',
'value' => array('yogeshchauhan', 'w3org'),
'compare' => 'IN',
),
array(
'key' => 'featured',
'value' => '1',
'compare' => '=',
),
),
);
// query
$the_query = new WP_Query( $args );
?>
have_posts() ): ?>
Credit: ACF Docs
ACF custom examples get_posts post type WP_Query