Typecho首页不显示某分类
时间:4年前 阅读:2470
Typecho首页不显示某分类
<?php while($this->next()): ?> <?php if($this->category != "cateslug"): ?> //正常输出循环 <?php endif; ?> <?php endwhile; ?>
后台设置首页输出条目数量多一点,例如10条。
<?php $temp = 1; while( $this->next() ):?> <?php if( $this->category != 'category'):?> <?php if( $temp > 5) break; $temp++;?> // your theme code <?php endif;?> <?php endwhile;?>
code中的5是要输出的数目。
网友评论