1
我已經包含在$ postarray後ID數組。我想在Wordpress中打印與這些ID相對應的帖子。 我使用的代碼如下:我怎麼能有WordPress的帖子打印其ID出現在一個陣列?
query_posts(array('post__in' => $postarray));
if (have_posts()) :
while (have_posts()) : the_post();
the_title();
the_excerpt();
endwhile;
endif;
儘管如此,循環打印最近發表的文章,而不是包含在數組中的職位。我如何讓wordpress使用我在數組中提供的帖子ID並按順序打印這些帖子?
我繼續鍵入答案,但應該工作。你可能想嘗試製作一個新的WP Query類。 – 2009-07-29 16:06:41
嘗試新WP_Query(); - 沒有運氣。 – 2009-07-29 16:52:18