Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
WordPress非凡,我需要你的帮助!
我需要能够列出档案,但方式与 WP 法典略有不同,或者谷歌搜索会告诉我一个小时。
我需要一年中的几个月,作为通用存档功能,但一次只需要一年。所以,列出 2007 年的所有月份。我还需要能够在同一个模板中多次使用它,用于不同的年份。我有一种感觉 query_posts 可能是这样,但我不太确定。
有人有什么想法吗?
来自 Wordpress 法典
<?php wp_get_archives('type=yearly'); ?>
http://codex.wordpress.org/Creating_an_Archive_Index