子比主题 – 文章自定义前缀

根据https://www.zibll.com/forum-post/22599.html的创意自己写的代码,原理是使用CSF框架创建一个metabox给文章储存相关数据,然后通过过滤文章标题实现在文章前面增加前缀

截图

图片[1]_子比主题 – 文章自定义前缀_初一小盏
图片[2]_子比主题 – 文章自定义前缀_初一小盏
图片[3]_子比主题 – 文章自定义前缀_初一小盏
图片[4]_子比主题 – 文章自定义前缀_初一小盏

代码

代码放在functions.php下或func.php

CSS

.DearLicy_prefix{
    position: relative;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    border-radius: 5px;
    padding: 5px 4px;
    margin-right: 3px;
    height: 19px;
    font-size: 12px;
    top: -3px;
    clip-path: polygon(7% 0, 99% 0, 93% 100%, 0 100%);
}
.DearLicy_prefix:after, .DearLicy_prefix:after {
    position: absolute;
    content: " ";
    display: block;
    left: -100%;
    top: -5px;
    width: 15px;
    height: 145%;
    background-image: linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0));
    animation: sweepTitle 3s ease-in-out infinite;
    transform: rotate(28deg);
}
@keyframes sweepTitle {
    0% {
        left: -100%
    }

    100% {
        left: 100%
    }
}
子比主题 - 文章自定义前缀_初一小盏
子比主题 – 文章自定义前缀
此内容为付费阅读,请付费后查看
10
立即购买
您当前未登录!建议登陆后购买,可保存购买订单
官方实测
网站建设
二次开发
安装指导
付费阅读
已售 26
THE END
喜欢就支持一下吧
点赞15赞赏 分享
评论 抢沙发

    暂无评论内容