Typecho默认主题导航栏菜单显示所有分类
2023-02-18 16:41:16 时间
Typecho默认主题导航栏菜单仅显示了首页和关于页面,如果我们添加了更多分类目录是不会显示出来的,需要修改主题目录下的header.php文件。
将55-59行使用如下代码替换:
<a<?php if($this->is('index')): ?> class="current"<?php endif; ?> href="<?php $this->options->siteUrl(); ?>"><?php _e('首页'); ?></a>
<?php $this->widget('Widget_Metas_Category_List')->to($category); ?>
<?php while($category->next()): ?>
<a<?php if($this->is('category', $category->slug)): ?> class="current"<?php endif; ?> href="<?php $category->permalink(); ?>" title="<?php $category->name(); ?>"><?php $category->name(); ?></a>
<?php endwhile; ?>
相关文章
- 数据科学|Pandas 对数值进行分箱操作的 4 种方法
- Autodesk Maya 2023 for Mac(三维动画制作软件) v2023.3中文激活版
- 如何使用并查集解决朋友圈问题?
- 数据科学|数据科学中的信息理论方法
- 金融科技|普惠金融下的智能信贷风控
- 使用单调栈解决 “下一个更大元素” 问题
- 使用单调队列解决 “滑动窗口最大值” 问题
- 2022年最好用的五款设备管理软件
- 什么是APERAK?
- S2-001 远程代码执行漏洞
- CVE-2010-1870 S2-005 远程代码执行漏洞
- CVE-2012-0391 S2-008 远程代码执行漏洞
- CVE-2011-3923 S2-009 远程代码执行漏洞
- CVE-2013-1965 S2-012 远程代码执行漏洞
- CVE-2013-1966 S2-013 远程代码执行漏洞
- 我把 CPU 三级缓存的秘密,藏在这 8 张图里
- CVE-2013-2134 S2-015 远程代码执行漏洞
- 12 张图看懂 CPU 缓存一致性与 MESI 协议,真的一致吗?
- CVE-2013-2251 S2-016 远程代码执行漏洞
- certbot免费证书-2:centos7程序自动化续费免费证书certbot