智能总结摘要
AI助理
生成中...
文章最后更新时间:
简介:
今天给大家分享一个好玩的东西,它就是文章列表右上角添加文章置顶+新文章发布ICON图标,
![图片[1]-文章列表右上角添加文章置顶+新文章发布ICON图标【子比教程】-轩逸博客](https://www.xyi66.cn/wp-content/uploads/2022/09/20240802205120371-IMG_2458.jpeg)
PHP代码:
在子比主题目录下“func.php”(子比主题推荐放这里)或者“functions.php”,在合适位置放下面PHP代码
上面《img》标签icon图标链接自己修改
图标素材:
![图片[2]-文章列表右上角添加文章置顶+新文章发布ICON图标【子比教程】-轩逸博客](https://xyiyun-1303847110.cos.ap-shanghai.myqcloud.com/2022/09/new.png)
![图片[3]-文章列表右上角添加文章置顶+新文章发布ICON图标【子比教程】-轩逸博客](https://xyiyun-1303847110.cos.ap-shanghai.myqcloud.com/2022/09/xin-top.png)
最关键的PHP代码及放置位置:
在子比主题目录下“/zibll/inc/functions/zib-posts-list.php”文件中,放在获取文章列表标题内 大概440行的文章放入下面PHP代码(看图)
$html .= tianyishangke_post_newicon($post);//轩逸博客新文章+置顶文章icon图标函数$html .= tianyishangke_post_newicon($post);//轩逸博客新文章+置顶文章icon图标函数$html .= tianyishangke_post_newicon($post);//轩逸博客新文章+置顶文章icon图标函数
![图片[4]-文章列表右上角添加文章置顶+新文章发布ICON图标【子比教程】-轩逸博客](https://xyiyun-1303847110.cos.ap-shanghai.myqcloud.com/2022/09/IMG_20220912_182429.png)
CSS代码:
/*轩逸博客·新文章发布图标样式*/.posts-item{position: relative !important;}.tianyishangke-new-icon{position: absolute;height: 35px;right: 0;top: 0;}.tianyishangke-new-icon img{-webkit-user-drag: none;}/*轩逸博客·新文章发布图标样式*/ .posts-item{position: relative !important;} .tianyishangke-new-icon{position: absolute;height: 35px;right: 0;top: 0;} .tianyishangke-new-icon img{-webkit-user-drag: none;}/*轩逸博客·新文章发布图标样式*/ .posts-item{position: relative !important;} .tianyishangke-new-icon{position: absolute;height: 35px;right: 0;top: 0;} .tianyishangke-new-icon img{-webkit-user-drag: none;}
演示图:
![图片[5]-文章列表右上角添加文章置顶+新文章发布ICON图标【子比教程】-轩逸博客](https://xyiyun-1303847110.cos.ap-shanghai.myqcloud.com/2022/09/Screenshot_2022_0912_185212.png)
感谢您的来访,获取更多精彩文章请收藏本站。

供学习和研究使用,请在下载后24小时内删除
购买前可以联系作者确认资源信息,防止交易矛盾
Whatever I believed, I did; and whatever I did, I did with my whole heart and mind.
凡是我相信的,我都做了;凡是我做了的事,都是全身心地投入去做的
THE END
- 最新
- 最热
只看作者