First point is that you should NOT use query_posts()
for custom queries. The better approach is to use the WP_Query
class. More info in the WP docs and here.
This example will display your 2 featured posts and then exclude them in the second query.
// We will push the ID of your featured posts to this array
$excl_posts[] = '';
// Query arguments from your featured posts query
$feat_args = array(
'posts_per_page' => '2',
'meta_query' => array(
array(
'key' => 'featured_post',
'value' => '1',
'compare' => 'LIKE'
)
)
);
// Instantiate new WP_Query instead of using query_posts()
$featured = new WP_Query( $feat_args );
if ( $featured->have_posts() ):
while ( $featured->have_posts() ):
$featured->the_post();
// Do stuff with each posts
echo get_the_title() . "<br>";
// Push current postID onto the exclude array
$excl_posts[] = get_the_ID();
endwhile;
endif;
wp_reset_postdata();
$excl_feat_args = array(
'posts_per_page' => '10',
'post__not_in' => $excl_posts,
'meta_query' => array(
array(
'key' => 'featured_post',
'value' => '1',
'compare' => 'LIKE'
)
)
);
$excl_featured = new WP_Query( $excl_feat_args );
if ( $excl_featured->have_posts() ):
while ( $excl_featured->have_posts() ):
$excl_featured->the_post();
echo get_the_title() . "<br>";
endwhile;
endif;
wp_reset_postdata();