我没用插件,新建一个名为monthly_article的form,类型是article HTML: <!-- show the year --> <txp:if_different> <h3><txp:posted format="%Y" /></h3> </txp:if_different> <!-- show the month --> <txp:if_different> <h4><txp:posted format="%B" /></h4> </txp:if_different> <!-- article title and link --> <li><txp:permlink><txp:title /></txp:permlink></li> 然后在页面里加上 HTML: <h2 class="pagetitle">Archives by Month</h2> <ul id="archive-pages"> <txp:article_custom limit=99999 form="monthly_article" /> </ul> 当然也可以在公用页面里用判断 HTML: <txp:if_section name="archive"> <h2 class="pagetitle">Archives by Month</h2> <ul id="archive-pages"> <txp:article_custom limit=99999 form="monthly_article" /> </ul> <txp:else /> <txp:article form="default" allowoverride="0"/> </txp:if_section>
老鬼的那个无法通过 W3C 验证,我的是这么写 HTML: <txp:if_different> <li style="margin-top:2em;"><txp:posted format="%B %Y" wraptag="h4" /></li> </txp:if_different> <li><txp:permlink><txp:title /></txp:permlink></li> HTML: <ul><txp:article_custom limit=99999 form="monthly_article" /></ul>