Typecho添加归档页面

在当前主题目录下新建php文件,粘贴如下代码,然后进入typecho后台新建page页面,然后选择模板为archives即可!
<?php
/**
* archives
* author:minirizhi.com
* @package custom
*/
$this->need('header.php'); ?>
<div id="main">
<div class="position">当前位置:<a href="./">首页</a> » <?php$this->title() ?></div>
<div class="post" id="post-<?php $this->cid(); ?>">
<h2><span class="float_l"><a href="<?php $this->permalink() ?>" title=""><?php $this->title() ?></a></span></h2>
<div class="clear"></div>
<div class="entry">
<?php $this->widget('Widget_Contents_Post_Recent','pageSize=10000')->parse('<li>{year}-{month}-{day} : <a href="{permalink}">{title}</a></li>'); ?>
<div class="clear"></div>
</div>
</div>
</div>
<?php $this->need('footer.php'); ?>
至于样式如果有不满意可以自己写下CSS美化下。

- 上一篇: typecho文章轮播代码
- 下一篇: typecho添加所有标签页面