Typecho 首页第一篇文章显示不一样

No Reply , Posted in 代码 on April 16, 2014

在做模板的时候有的时候想要第一篇文章和其他文章样式不一样。这时候就要用到这个代码了。
比如我这个博客就是用到了首页第一篇文章不一样的代码:http://www.guait.com
代码如下:

<?php if (($this->_currentPage == 1) && ($this->sequence == 1)): ?>
... //首页第一篇文章
<?php else: ?>
... //其它文章
<?php endif; ?>

标签: 判断