租用云服务器用于开发测试环境_文章页面添加文章字数和阅读时间

  发布时间:2026-10-25 02:36:02   作者:玩站小弟   我要评论
美化教程1、在主题目录下functions.php文件把下面的代码添加进去:// 文章字数和阅读时间 租用云服务器用于开发测试环境。
美化教程

1、文章文章在主题目录下functions.php文件把下面的页面代码添加进去:

// 文章字数和阅读时间 function count_words_<a target="_blank" href="https://www.kaiyuanyuanma.com/tag/710.html" title="View all posts in read">read</a>_<a target="_blank" href="https://www.kaiyuanyuanma.com/tag/711.html" title="View all posts in time">time</a>(){ global $<a target="_blank" href="https://www.kaiyuanyuanma.com/tag/712.html" title="View all posts in post">post</a>; $text_num = mb_strlen(preg_replace(/s/,,html_entity_decode(strip_tags($post->post_content))),UTF-8); $read_time = ceil($text_num/300); // 修订数字300调整时间 $output .= 共计 . $text_num . 字,阅读大约 . $read_time . 分钟。添加租用云服务器用于开发测试环境; return $output; } // 文章字数和阅读时间 function count_words_<a target="_blank" href="https://www.kaiyuanyuanma.com/tag/710.html" title="View all posts in read">read</a>_<a target="_blank" href="https://www.kaiyuanyuanma.com/tag/711.html" title="View all posts in time">time</a> () { global $<a target="_blank" href="https://www.kaiyuanyuanma.com/tag/712.html" title="View all posts in post">post</a>; $text_num = mb_strlen(preg_replace(/s/,字数,html_entity_decode(strip_tags($post->post_content))),UTF-8); $read_time = ceil($text_num/300); // 修订数字300调整时间 $output .= 共计 . $text_num . 字,阅读大约 . $read_time . 分钟。和阅免费云存储云服务器体验; return $output; } // 文章字数和阅读时间 function count_words_read_time () { global $post; $text_num = mb_strlen(preg_replace(/s/,文章文章免费云开发环境云服务器体验,html_entity_decode(strip_tags($post->post_content))),UTF-8); $read_time = ceil($text_num/300); // 修订数字300调整时间 $output .= 共计 . $text_num . 字,阅读大约 . $read_time . 分钟。页面; return $output; }

2、添加在主题目录zibll/inc/functions/zib-single.php,字数把下面代码添加到132行处(如下图)

<!--文章字数和阅读时间--><i class="fa fa-hourglass-start"></i><?php echo count_words_read_time(); ?> <!--文章字数和阅读时间--><i class="fa fa-hourglass-start"></i> <?php echo count_words_read_time(); ?> <!--文章字数和阅读时间--><i class="fa fa-hourglass-start"></i> <?php echo count_words_read_time(); ?>

阐释:(必看)文章字数和阅读时间都不是很准,同时用处也不是和阅很大…喜爱的话自己拿去试试吧!

文章文章内容看完了

相关文章

  • 价值499元的网盘系统源码

    网盘系统提供了一套在线网盘打理系统,支撑多用户、共享等功能,支撑多种云存储,帮您快速搭建一套公私兼备的网盘系统。链接:https://pan.baidu.com/s/1gETJHlugXy8-sPrY
    2026-10-25
  • 日本国外服务器租用多少钱一年:详细解析与价格参考

    日本国外服务器租用多少钱一年:详细解析与价格参考你是否正在计划将业务拓展至日本市场,或者需要处理对日本用户响应速度至关重要的应用?无论是内容分发、游戏服务器还是数据处理,选择合适的服务器位置至关重要。
    2026-10-25
  • 日本游戏大厅下载,畅享经典游戏乐趣!

    日本游戏大厅下载,畅享经典游戏乐趣! 重新发现游戏的乐趣:日本游戏大厅下载,畅享经典游戏世界!还记得小时候,我第一次拿起游戏机,手指头刚碰到按键,就感觉自己已经置身于一个奇幻的世界里了吗?那种心跳加速
    2026-10-25
  • 最新云服务器类型全解析:从入门到高阶

    最新云服务器类型全解析:从入门到高阶你是否曾经在深夜加班时,面对计算机崩溃或存储空间不足的烦恼?作为一名普通用户或IT新手,你可能想知道云服务器到底是什么,以及它如何改变你的工作和生活。别担心,这篇文
    2026-10-25
  • xiuno修订网站字体方法

    支撑@font-face的浏览器有Internet Explorer 9、Firefox Opera、Chrome和Safari,另外IE9只支撑.eot类型的字体,Firefox、Chrome、Sa
    2026-10-25
  • 日本服务器服务:全面解析与选择指南

    日本服务器服务:全面解析与选择指南如今,全球化业务的扩展已成为企业发展的必由之路。然而,随着用户遍布全球,服务器的地理位置问题也逐渐浮出水面。许多企业在选择服务器时,常因网络延迟或数据处理效率问题,导
    2026-10-25

最新评论