代码实现前台文章界面显示文章字数统计代码 之前只能在后台显示,现在前台也就可以显示。
使用方法
在functions.php文件中加入以下代码-有些主题会是在functions-theme.php文件中。
代码
//字数统计function count_words ($text) {global $post;if ( '' == $text ) {$text = $post->post_content;if (mb_strlen($output, 'UTF-8') < mb_strlen($text, 'UTF-8')) $output .= '本文共' . mb_strlen(preg_replace('/\s/','',html_entity_decode(strip_tags($post->post_content))),'UTF-8') . '个字';return $output; } }
调用代码
<?php echo count_words ($text); ?>
提示:放在文章配置文件(合适的位置就可以了)
I really enjoy the blog. Much thanks again. Really Great. Willamina Yule Niall
Hello there! Do you know if they make any plugins to safeguard against
hackers? I’m kinda paranoid about losing everything
I’ve worked hard on. Any recommendations?
Aw, this was a really good post. Finding the time and actual effort to produce a really good article… but
what can I say… I hesitate a lot and don’t manage to get nearly anything
done.
I believe this is one of the such a lot significant info for me.
And i’m satisfied studying your article. But should statement on few basic issues, The site taste is perfect, the articles is in point of
fact nice : D. Just right activity, cheers
I will be putting this dazzling insight to good use in no time. Inez Redd Benil
Excellent. Crys and Roz might implement these suggestions Devonne Aleksandr Medlin
That is a good tip particularly to those fresh to the blogosphere. Aura Rainer Hadlee
I am genuinely thankfujl to the owner of this web page who has shared this great pst at at tthis place. Gigi Chic Ehudd Rycca Georas Mel
Hey there. I found your blog by means of Google whilst looking for a comparable matter, your site came up. It seems good. I have bookmarked it in my google bookmarks to visit then. Anabella Saw Allanson
I simply could not go away your website prior to suggesting that I extremely loved the usual info an individual supply to your guests? Is gonna be again continuously to inspect new posts Nola Cross Ahl
Hello to all, how is all, I think every one is getting more from this website, and your views are pleasant designed for new people.| Malva Husein Emelita
You are my breathing in, I own few web logs and rarely run out from to brand. Cecilia Fernando Pryor
Dianne, you absolutely hit the nail on the head. I am experiencing many of these same feelings while I am confined to my place. Will my garden be more beautiful this year because I have the opportunity to create it with more creative time to plan? Is my place now in my home to make it exactly how I want it to be? Instead of running around playing tennis, meeting with friends, and planning family events, I now have very busy days with video socializing and solitary walks. Yes, time to connect with my true purpose. Shirl Nathaniel Epner
Hello, this weekend is nice in support of me, because this point in time i am reading this fantastic educational post here at my house.| Moyra Thorin Warden
I could not resist commenting. Exceptionally well written! Deerdre Durand Bianca
Hi friends, its enormous post on the topic of educationand completely explained, keep it up all the time. Ame Emory Catlin
Wow, this article is good, my younger sister is analyzing such things, therefore I
am going to let know her.
【wordpress代码】给博客文章添加字数统计代码 六泽博客–
最全能的博客 sexy women clothing https://adecorpassion.blogspot.com/2020/10/view-gambar-artis-ter-hot-gif.html
Very good information. Lucky me I discovered your blog by accident (stumbleupon).
I have bookmarked it for later! https://gumroad.com/l/takipci-satin-al-tr
Good info. Lucky me I recently found your site by chance
(stumbleupon). I have bookmarked it for later! https://500px.com/p/trmedya?view=groups
I have been surfing online more than three hours today,
yet I never found any interesting article like yours.
It’s pretty worth enough for me. In my view, if all webmasters and bloggers made
good content as you did, the web will be much more useful
than ever before. asmr 0mniartist
Hello there! I could have sworn I’ve been to this web site before but after going through some of the articles
I realized it’s new to me. Nonetheless, I’m definitely happy I came
across it and I’ll be bookmarking it and checking back often! https://www.rhmod.com/lili-postegro-apk-indir/
Why visitors still use to read news papers when in this technological
globe all is available on web? 0mniartist asmr
Hi just wanted to give you a brief heads up and let you
know a few of the pictures aren’t loading correctly. I’m not sure why but I think its
a linking issue. I’ve tried it in two different browsers and both show the same
outcome. 0mniartist asmr
There is definately a great deal to know about this issue.
I love all of the points you made. https://shortmoz.link/apk-indir