Title: wp-word-count
Author: redlettuce
Published: <strong>2010年8月18日</strong>
Last modified: 2023年4月1日

---

プラグインを検索

![](https://s.w.org/plugins/geopattern-icon/wp-word-count.svg)

# wp-word-count

 作者: [redlettuce](https://profiles.wordpress.org/redlettuce/)

 * [詳細](https://ja.wordpress.org/plugins/wp-word-count/#description)
 * [レビュー](https://ja.wordpress.org/plugins/wp-word-count/#reviews)
 * [開発](https://ja.wordpress.org/plugins/wp-word-count/#developers)

 [サポート](https://wordpress.org/support/plugin/wp-word-count/)

## 説明

このプラグインの公開は2024年6月15日に停止されており、ダウンロードできません。 理由:
セキュリティ上の問題。

## 評価

![](https://secure.gravatar.com/avatar/6748096252a4aafe3f38ecb5bd2d987759c693d4ba2e235431513e16a94e3037?
s=60&d=retro&r=g)

### 󠀁[Found a Better Way](https://wordpress.org/support/topic/found-a-better-way/)󠁿

 [JJNW](https://profiles.wordpress.org/jjnw/) 2023年12月27日

This plugin is a bit over the top for my needs. I just want a little box to display
the number of words in the post (under all the other little boxes on the right side
that has Revisions, Tags, Categories, underneath those). Placed this in my functions.
php and it does the trick. /* START word count post */ function add_word_count_meta_box(){
add_meta_box('word_count_meta_box', 'Word Count', 'word_count_callback', 'post','
side'); } function word_count_callback($post) { // We'll use JavaScript to update
this live echo '<div id="word-count-wrapper">Word Count: <span id="word-count">0
</span></div>'; ?> <script type="text/javascript"> jQuery(document).ready(function(
$) { var updateWordCount = function() { var content; if (window.tinymce) { var editor
= tinymce.get('content'); if (editor && editor instanceof tinymce.Editor) { content
= editor.getContent({ format: 'text' }); } else { content = $('#content').val();}}
else { content = $('#content').val(); } var wordCount = content.split(/\s+/).filter(
function(word) { return word.length > 0; }).length; $('#word-count').text(wordCount);};//
For classic editor $('#content').on('input', updateWordCount); // For block editor
if (window.wp && wp.data && wp.data.subscribe) { var checkForWordCountUpdate = function(){
var content = wp.data.select('core/editor').getEditedPostContent(); var wordCount
= content.split(/\s+/).filter(function(word) { return word.length > 0; }).length;
$('#word-count').text(wordCount); }; wp.data.subscribe(checkForWordCountUpdate);}//
Initial count on page load updateWordCount(); }); </script> <?php } add_action('
add_meta_boxes', 'add_word_count_meta_box'); /* END word count post */ The code 
provided for the WordPress word count functionality defines a word as any sequence
of characters separated by whitespace. Specifically, this is how the word count 
is calculated: Splitting the Text: The split(/\s+/) function in JavaScript is used
to split the content of the post into an array of substrings using a regular expression.
The \s+ pattern matches any sequence of whitespace characters (spaces, tabs, newlines,
etc.). Filtering Non-Empty Words: The filter(function(word) { return word.length
> 0; }) part of the code filters out any empty strings from the array. This is important
because the split function can create empty strings if there are spaces at the beginning
or end of the text, or multiple spaces in a row. Counting Words: The length property
of the resulting array (after splitting and filtering) gives the number of words.
Each element of the array represents a word. With this code, a word is any non-empty
string of characters that is separated from other words by one or more whitespace
characters. This is a common and general way to count words, but it does have limitations.
For example, it doesn't account for words joined by hyphens (like "long-term") or
apostrophes (like "don't"), which are typically counted as single words. Additionally,
numbers or strings of punctuation without spaces would also be counted as words.
This approach is suitable for a general word count feature, but for more advanced
or specific word counting rules, the code would need to be adjusted accordingly.

![](https://secure.gravatar.com/avatar/4aa54f70085745741cdfbcfb74d88f8e9c3925a75c6a5c554160d5105866ddcc?
s=60&d=retro&r=g)

### 󠀁[don’t waste your time](https://wordpress.org/support/topic/dont-waste-your-time-120/)󠁿

 [dunavista](https://profiles.wordpress.org/dunavista/) 2023年11月11日

Not good at all, no functionality at all, and a total waste of time. you are better
off using the opensource WordPress word count providedof course, you might get the
bells and whistles if you pay, but I would rather use my own FREE code snippets

![](https://secure.gravatar.com/avatar/85aa3529dcb4e6562582713f003c927026d077bbc7121a07c75e6d33c78744ac?
s=60&d=retro&r=g)

### 󠀁[unusable](https://wordpress.org/support/topic/unusable-42/)󠁿

 [alexa69](https://profiles.wordpress.org/alexa69/) 2019年10月23日 1 reply

not all words count. unusable

![](https://secure.gravatar.com/avatar/b0942f3e90b062c407d89467713478422076cd43fddb9ef80288d6a43a8577e9?
s=60&d=retro&r=g)

### 󠀁[Almost Perfect, But not suitable for Chinese users](https://wordpress.org/support/topic/almost-perfect-but-not-suitable-for-chinese-users/)󠁿

 [Bill Chen](https://profiles.wordpress.org/billchen2000/) 2019年2月25日

Hi, I'm so impressed with this amazing plugin. However, for Chinese bloggers we 
don't separate our words with spaces. What we call the word number usually means
the character number. So could you please add a feature that can calculate the character
numbers (ignore space and punctuation) of all my post? Much thx！

![](https://secure.gravatar.com/avatar/6773458ccc57eec21ce50b8c78080ad18d3275abf47594e192f09ebb5c740240?
s=60&d=retro&r=g)

### 󠀁[Time saver](https://wordpress.org/support/topic/time-saver-207/)󠁿

 [rmizrah1](https://profiles.wordpress.org/rmizrah1/) 2018年9月26日

Thank you!

![](https://secure.gravatar.com/avatar/5ae431811d1ab09e33d62f0b8517f1dc7b4af91a6534e0ec4e51d763b3d224bf?
s=60&d=retro&r=g)

### 󠀁[It doesn’t support page builders](https://wordpress.org/support/topic/it-doesnt-support-page-builders/)󠁿

 [Vincent Poirier](https://profiles.wordpress.org/magikweb/) 2018年2月5日

We use CornerStone / Pro from Themeco and it seems like the process is having a 
hard time finding out what is a word and what is not. WP Word Count's result is 
~1500 words for a ~4500 words page. We manually compared to make sure.

 [ 13件のレビューをすべて表示 ](https://wordpress.org/support/plugin/wp-word-count/reviews/)

## 貢献者と開発者

wp-word-count はオープンソースソフトウェアです。以下の人々がこのプラグインに貢献
しています。

貢献者

 *   [ redlettuce ](https://profiles.wordpress.org/redlettuce/)

“wp-word-count” は2ロケールに翻訳されています。 [翻訳者](https://translate.wordpress.org/projects/wp-plugins/wp-word-count/contributors)
のみなさん、翻訳へのご協力ありがとうございます。

[“wp-word-count” をあなたの言語に翻訳しましょう。](https://translate.wordpress.org/projects/wp-plugins/wp-word-count)

### 開発に興味がありますか ?

[コードを閲覧](https://plugins.trac.wordpress.org/browser/wp-word-count/)するか、
[SVN リポジトリ](https://plugins.svn.wordpress.org/wp-word-count/)をチェックする
か、[開発ログ](https://plugins.trac.wordpress.org/log/wp-word-count/)を [RSS](https://plugins.trac.wordpress.org/log/wp-word-count/?limit=100&mode=stop_on_copy&format=rss)
で購読してみてください。

## メタ

 *  バージョン **3.2.4**
 *  最終更新日 **4年前**
 *  有効インストール数 **該当なし**
 *  WordPress バージョン ** 4.0またはそれ以降 **
 *  検証済み最新バージョン: **6.2.0**
 *  言語
 * [Chinese (Taiwan)](https://tw.wordpress.org/plugins/wp-word-count/)、[Dutch](https://nl.wordpress.org/plugins/wp-word-count/)、
   [English (US)](https://wordpress.org/plugins/wp-word-count/).
 *  [プラグインを翻訳](https://translate.wordpress.org/projects/wp-plugins/wp-word-count)
 *  [詳細を表示](https://ja.wordpress.org/plugins/wp-word-count/advanced/)