像CMS那样,输出全部分类,并按分类输出文章:/* 循环所有的分类 */ /* 循环当前分类下的文章 */ //判断第一篇文章 []:)...
像CMS那样,输出全部分类,并按分类输出文章:/* 循环所有的分类 */ /* 循环当前分类下的文章 */ //判断第一篇文章 []:)...
前台输出相关统计:文章总数:篇分类总数:个评论总数:条页面总数:个...
输出全部分类,并对当前分类current标记: class="current" class="current">...
导航菜单不显示某分类或某页面 //循环语句开始 // 记得闭合 if 语句...
首页第一篇文章显示不一样 ... //首页第一篇文章 ... //其它文章...
Typecho侧边栏不显示博主评论,sidebar.php文件 <?php $this->widget('Widget_Comments_Recent','ignoreAuthor=true')->to($comments); ?>...
首页不显示某分类<?php while($this->next()): ?><?php if($this->category != "cateslug"): ?>//正常输出循环<?php endif; ?><?php endwhile; ?>...
可应用于自定义分类,或者,判断某些分类输出不同CSS。category == "help"): ?>//当前分类为help缩略图,则输出内容。...
判断是否为首页,输出相关内容://首页输出内容//不是首页输出内容...
判断为当前页的第几篇文章,并单独输出代码,可应用于第一篇文章底部广告://需要的插入...
调用某分类最新文章,pageSize是数量,mid是分类号:...
自定义分类、标签、搜索、首页等文章分页数量,修改 functions.php 文件:function themeInit($archive) { if ($archive->is('index')) { $archive->parameter->page...
自定义标签数量(就这里面的20),按照文章数量排序:...
全部标签列表,按照MID排序:<?php $this->widget('Widget_Metas_Tag_Cloud') ->to($taglist); ?><?php while($taglist->next()): ?><li><a href="<?ph...
全部文章列表,可应用于归档或网站地图,蜘蛛指引等<?php $this->widget('Widget_Contents_Post_Recent', 'pageSize=10000')->parse('<li>{year}-{month}-...
根据TAG调用相关文章:<?php $this->related(5)->to($relatedPosts); ?><ul> <?php while ($relatedPosts->next()): ?> <li><a href="<?php $relatedPosts->permalink(...
自定义一下标题,以下为代码和参考案例: <?php if($this->_currentPage>1) echo '第 '.$this->_currentPage.' 页 - '; ?><?php $this->archiveTitle('...
使用这样的代码,可以自定义相关header内容: <?php if($this->is('index')): ?><?php $this->header('description=关键字。'); ?><?php else: ?><?php $this-...