简短回答:没有。
但是,如果您想对所有需要的帖子使用一个循环,可以这样做:
$args = array(
\'post_type\' => \'product\',
\'meta_query\' => array(
array(
\'key\' => \'cf_type\',
\'value\' => \'fog\', // need to have 10 with value \'fog\' and 10 with value \'gof\'
)
),
\'numberposts\' => 10,
\'orderby\' => \'modified\',
\'order\' => \'desc\',
\'fields\' => \'ids\'
);
$postsfog = get_posts($args);
$args[\'meta_query\'] = array(array(\'key\' => \'cf_type\',\'value\' => \'gof\');
$postsgof = get_posts($args);
$myloopposts = get_posts(array(
\'posts_per_page\' => -1,
\'posts__in\' => array_merge($postsfog,$postsgof)),
\'post_type\' => \'product\',
\'orderby\' => \'post__in\',
\'ignore_sticky_posts\' => true
));