0

在我的网站中,我想添加一个存档页面或一个自定义页面,我想在其中显示来自特定类别的帖子以及日期格式的帖子

例如:我在类别:技术 一天的所有帖子都将显示在此页面上,就像我那天只写了 3 个帖子一样。

导航的下一页将是上一个日期页面..它将显示前一天的所有帖子,如 6 个帖子等

我看到此功能的示例页面是:http ://www.thedailybeast.com/cheat-sheet/

我想以标题、小摘录格式显示它们..

我认为它可能使用自定义页面格式..

希望我能得到一个快速的回应.. thnx

4

1 回答 1

1

您可能可以使用您的archive.php 文件或制作自定义模板文件,然后使用query_posts。请参阅:http ://codex.wordpress.org/Template_Tags/query_posts

我会在“将变量传递给 query_posts”下查看示例 2,这样的东西应该可以工作。

    <?php

$current_day = date('d');
$current_month = date('m');
$current_year = date('Y');

query_posts("cat=22&year=$current_year&monthnum=$current_month&day=$current_day&order=ASC");
?>
<!-- put your loop here -->
于 2009-12-08T06:58:21.327 回答