Typecho判断为当前页的第几篇文章,并单独输出代码,可应用于第一篇文章底部广告::<?php if ($this->sequence == 0): ?> //需要的插入 <?php endif; ?>
话题 代码 文章
让首页第一篇文章显示不相同的代码:<?php if (($this->_currentPage == 1) && ($this->sequence == 1)): ?> ... //首页第一篇文...
Typecho单独调用评论列表的代码,代码作者Mr.Asong:<?php $slug = "message"; //页面缩略名 $limit =...
Typecho 变成CMS那样,输出全部分类,并按分类输出文章: <?php $this->widget('Widget_Metas_Category_List')->to($categor...
Typecho首页不显示某分类文章的代码如下:<?php while($this->next()): ?> <?php if($this->category != "cateslug"): ?> /...
Typecho中自定义标签数量(就这里面的20),按照文章数量排序代码:<?php $this->widget('Widget_Metas_Tag_Cloud', array('sort' => 'count', '...
Typecho自定义调用某分类,并输出缩略图的代码如下:<?php $this->widget('Widget_Archive@index', 'pageSize=4&type=category', 'mid=23...
Typecho侧边栏不显示博主评论代码,需要修改sidebar.php文件<?php $this->widget('Widget_Comments_Recent','ignoreAuthor=true')->to($...
Typecho自定义分类、标签、搜索、首页等文章分页数量,修改 functions.php 文件代码:function themeInit($archive) { if ($archive->is('index')) { $ar...
Typecho自定义一下标题,以下为代码:<?php if($this->_currentPage>1) echo '第 '.$this->_currentPage.' 页 - '; ?><?php...