0
有没有办法查询多个特定的帖子?例如,下面得到一个:WordPress的 - query_posts
// retrieve one post with an ID of 670
query_posts('p=670');
但据我所知,我不能扩大此做两个职位,用逗号分隔。有谁知道更好的方法?
有没有办法查询多个特定的帖子?例如,下面得到一个:WordPress的 - query_posts
// retrieve one post with an ID of 670
query_posts('p=670');
但据我所知,我不能扩大此做两个职位,用逗号分隔。有谁知道更好的方法?
这应该工作:
query_posts(array('post__in' => array(670, 671, 672)));
来源: http://codex.wordpress.org/Function_Reference/query_posts#Post_.26_Page_Parameters
辉煌!谢谢。一旦时间限制到达,我会批准。 – Matrym 2010-06-25 00:55:57