typecho 自定义文章分类
默认情况下,官方给的代码<?php $this->category(','); ?>
是一个a链接,然后多个则用第一个参数逗号分隔。
如果我们不想要a链接,可以给第二个参数传个false
,这样输出的就是文本了。
<?php $this->category(',',false); ?>
即便是这样也不方便,因为我们可能需要对这个a元素添加class,但是官方这个生成的是定死的,不太方便,所以我搞了半天,写了个完全自定义的文章分类。
此处内容已隐藏回复后方可阅读。
大家可以自行对号入座,需要什么,调用对应的属性就行了,并且输出的html内容完全是自定义的,奈斯。。。
分类:
Typecho博客教程
标签:
typecho分类自定义
版权申明
本文系作者 @木灵鱼儿 原创发布在木灵鱼儿站点。未经许可,禁止转载。
最新文章
如何在项目中使用一个自定义的npm模块(如何使用一个魔改后的npm模块)
0点赞
·
1评论
Debian12 更新系统版本(目前更新至12.5版本)
0点赞
·
0评论
Nestjs CORS配置和生产环境处理
1点赞
·
0评论
Debian12 SSH连接报错:Error Handshake failed no matching host key format
0点赞
·
0评论
Prisma 使用MongoDB创建数据时报错:Prisma needs to perform transactions, which requires your MongoDB server to be run as a replica set.
0点赞
·
0评论
目录
暂无目录
全部评论 27
sualiu
Google Chrome Windows 10zhang
Google Chrome Windows 10安和
FireFox Windows 10小八
Google Chrome Windows 10gg
Google Chrome Windows 10Jethro
Google Chrome Windows 10简单
Google Chrome Windows 10简单
Google Chrome Android小小帽
Google Chrome Windows 10是的惹
Google Chrome Android