$exclude_posts = array();//array of id's that are in aggregato custom fields
$query = new WP_Query( array(
'post_type' => array( 'post', 'aggregato' ),
'posts_per_page'=> 12,
'posts_not_in' => $exclude_posts,
'meta_query' => array(
array(
'key' => 'home',
'value' => '_wp_zero_value',
'compare' => '>'
)
)
) );
You can check this http://codex.wordpress.org/Class_Reference/WP_QueryWP_Query
for more info
youYou can use url_to_postid()url_to_postid()
to get id's from url's