【发布时间】:2014-02-18 05:03:52
【问题描述】:
我有一个包含此代码的页面:
<?php
$year = date('Y');
$catquery = new WP_Query( "category_name=isonomia&year=$year" );
while($catquery->have_posts()) : $catquery->the_post();
?>
<?php the_time('Y-m-d'); ?> - <a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a><br />
<?php endwhile; ?>
如何在页脚中添加链接以显示具有相同代码的其他年份?
【问题讨论】:
标签: php wordpress date post footer