循环开始使用前query_posts.可获得的parameters are here.类似这样:
global $wp_query;
query_posts( array(
\'post_type\' => \'mycustomname\',
\'tax_query\' => array(
\'relation\' => \'AND\',
array(
\'taxonomy\' => \'mytaxonomyname\',
\'field\' => \'slug\',
\'terms\' => array(
\'myterm1slug\',
\'myterm2slug\'
)
)
)
)
);