document.writeln('');

在公车被猛烈进入爽文,啊灬轻点大JI巴太粗又长A片,亚洲色欲AV成人无码久久精品 ,国产大片内射1区2区,久久久网址,亚洲一区二区三区免费视频,精品欧美一区二区三区久久久,久久国产精品-久久精品

當(dāng)前位置:首頁 > 免費(fèi)源碼 > 文章頁面添加文章字?jǐn)?shù)和閱讀時(shí)間

文章頁面添加文章字?jǐn)?shù)和閱讀時(shí)間

美化教程

1、在主題目錄下functions.php文件把下面的代碼添加進(jìn)去:

// 文章字?jǐn)?shù)和閱讀時(shí)間
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); // 修改數(shù)字300調(diào)整時(shí)間
$output .= 共計(jì) . $text_num . 字,閱讀大約 . $read_time . 分鐘。;
return $output;
}
//  文章字?jǐn)?shù)和閱讀時(shí)間
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); // 修改數(shù)字300調(diào)整時(shí)間
  $output .= 共計(jì) . $text_num . 字,閱讀大約 . $read_time  . 分鐘。;
  return $output;
}
//文章字?jǐn)?shù)和閱讀時(shí)間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); // 修改數(shù)字300調(diào)整時(shí)間$output .= 共計(jì) . $text_num . 字,閱讀大約 . $read_time. 分鐘。;return $output;}

2、在主題目錄zibll/inc/functions/zib-single.php,把下面代碼添加到132行處(如下圖)

<!--文章字?jǐn)?shù)和閱讀時(shí)間--><i class="fa fa-hourglass-start"></i> <?php echo count_words_read_time(); ?>
<!--文章字?jǐn)?shù)和閱讀時(shí)間--><i class="fa fa-hourglass-start"></i> <?php echo count_words_read_time(); ?>
<!--文章字?jǐn)?shù)和閱讀時(shí)間--><i class="fa fa-hourglass-start"></i> <?php echo count_words_read_time(); ?>

說明:(必看)文章字?jǐn)?shù)和閱讀時(shí)間都不是很準(zhǔn),同時(shí)用處也不是很大…喜歡的話自己拿去試試吧!