惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

T
Tenable Blog
Last Week in AI
Last Week in AI
P
Proofpoint News Feed
Engineering at Meta
Engineering at Meta
H
Help Net Security
F
Fortinet All Blogs
MyScale Blog
MyScale Blog
宝玉的分享
宝玉的分享
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
博客园 - 司徒正美
量子位
N
Netflix TechBlog - Medium
Apple Machine Learning Research
Apple Machine Learning Research
小众软件
小众软件
Recorded Future
Recorded Future
博客园 - 三生石上(FineUI控件)
Vercel News
Vercel News
aimingoo的专栏
aimingoo的专栏
I
InfoQ
Microsoft Security Blog
Microsoft Security Blog
Scott Helme
Scott Helme
The Last Watchdog
The Last Watchdog
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
IT之家
IT之家
AI
AI
WordPress大学
WordPress大学
Security Archives - TechRepublic
Security Archives - TechRepublic
Google Online Security Blog
Google Online Security Blog
U
Unit 42
V2EX - 技术
V2EX - 技术
MongoDB | Blog
MongoDB | Blog
Schneier on Security
Schneier on Security
博客园 - Franky
H
Heimdal Security Blog
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Jina AI
Jina AI
W
WeLiveSecurity
P
Privacy & Cybersecurity Law Blog
Cloudbric
Cloudbric
B
Blog RSS Feed
N
News | PayPal Newsroom
S
Securelist
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
I
Intezer
Hacker News - Newest:
Hacker News - Newest: "LLM"
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
博客园_首页
罗磊的独立博客
H
Hackread – Cybersecurity News, Data Breaches, AI and More
雷峰网
雷峰网

思有云 - IOIOX - Typecho

支持 typecho 1.2 的评论邮件通知插件 LoveKKCommentModify - 思有云 Typecho博客全站部署腾讯云CDN教程 - 思有云 - IOIOX 宝塔面板设置Typecho伪静态去掉index.php教程 - 思有云 - IOIOX Apache设置Typecho伪静态去掉index.php教程 - 思有云 - IOIOX Nginx设置Typecho伪静态去掉index.php教程 - 思有云 - IOIOX 群晖NAS安装配置typecho博客教程 - 思有云 - IOIOX
Typecho隐藏不显示某一个特定分类教程 - 思有云 - IOIOX
博主: Stille · 2019-10-19 · via 思有云 - IOIOX - Typecho
  • 发布时间:
  • 24765 次浏览
  • 14 条评论
  • 920字数
  • 分类: 技术教程
  1. 首页
  2. 正文  

前言

本文将介绍替换一条代码,实现Typecho隐藏不显示特定分类.

本文为 Stille 原创文章.经实践,测试,整理发布.如需转载请联系作者获得授权,并注明转载地址.


设置流程

找到希望隐藏的分类mid

进入typecho后台
管理-分类
点击你希望隐藏的分类名
此时浏览器上的url链接末尾数字就是你的分类mid
1.jpg

编辑替换代码

找到你typecho主题对应的首页分类所在的php文件,本文以handsome主题为例,其文件为 /usr/themes/handsome/component/aside.php

编辑aside.php
搜索关键词Widget_Metas_Category_List找到以下图中代码
2.jpg
替换代码

$this->widget('Widget_Metas_Category_List@options','ignore=1')

其中ignore=1中的数字为你希望隐藏的分类mid
3.jpg

完成修改

效果如图,全站页面左侧分类栏里就隐藏掉了该分类.
4.jpg


结语

目前此方法只能隐藏掉一个分类,如有大神知道如何简单的隐藏掉多个分类,或者有此功能的插件,请留言推荐给我和大家,谢谢!


晚高峰稳定 4K 的 IPLC 机场 解锁各流媒体 支持 ChatGPT. 晚高峰稳定 4K 的 IPLC 机场 解锁各流媒体 支持 ChatGPT. RedteaGO - 最划算的大陆漫游 eSim 流量卡,原生境外 IP,注册就送 3 刀。
RedteaGO - 最划算的大陆漫游 eSim 流量卡,原生境外 IP,注册就送 3 刀。

赞赏作者

如果喜欢我的文章,觉得对你有帮助,请随意赞赏!

Typecho隐藏不显示某一个特定分类教程

 •