第一、修改主题的zib-posts-list.php
找到主题目录中的/inc/functions/zib-posts-list.php文件,然后找到对应代码 :

第224行加上:
date_default_timezone_set('PRC'); $t1=$post->post_date; $t2=date("Y-m-d H:i:s"); $diff=(strtotime($t2)-strtotime($t1))/3600; if($diff<24){echo '<span class="new-icon"></span>';} else{echo "";} //开始输出
第二、添加样式
后台主题设置-全局功能-自定义代码-自定义CSS样式插入
/** 修改NEW标志样式hpeak.cn */.tab-content{positiON: relative;}/** NEW 图标文字版样式 **/.tab-content .new-icon{position: absolute;right: 1px;display: block;width: 40px;height: 40px;line-height: 20px;background-image: url(https://www.cen.ink/img/new.png);transform-origin: 0% 0%;}
最终效果:

© 版权声明
THE END















![红包猎手-自动抢红包神器[2022最新破解版]-嗨皮网-Hpeak.net](https://www.hpeak.net/wp-content/uploads/2022/02/1643645959.png)


暂无评论内容