1
当
我需要列出按月划分在2011年的所有帖子,我会做这样的事情在WordPress(很简单的解释here):的WordPress:列出所有文章和集团通过他们与月年
query_posts('monthnum=12&year=2011');
while (have_posts()) : the_post();
echo '<li>';
the_title();
echo '</li>';
endwhile;
现在,如何列出所有帖子,并将它们组合按月和年,不知道我应该走多远了?也就是说,我不知道哪一年是写入的最古老的帖子。从技术上讲,我可以试着做monthnum=12&year=2010
,monthnum=12&year=2009
等;但我觉得肯定有更好的办法。
看这一个 - http://stackoverflow.com/a/8503565/691506 – inlanger 2011-12-15 11:01:12