关注迷你日志公众号

有时候我们想首页不显示某个分类的文章,这个时候就需要用到这个代码了。

在模板index.php里修改

<?php while($this->next()): ?>
<?php if($this->category != "slug"): ?>
//slug为你不想在首页显示分类的slug名称
//正常输出循环
<?php endif; ?>
<?php endwhile; ?>
扫码了解详情