WordPressで単語数の統計を取りたいですか?
投稿を書く際、目標語数が決まっている場合があります。さらに、単語数の統計をモニタリングすることで、どの投稿の長さが最もトラフィックやエンゲージメントを獲得できるかなどのインサイトを得ることができます。
この投稿では、WordPressで詳細な単語数の統計情報を表示する方法を紹介します。
なぜWordPressサイトのワードカウント統計を取るのか?
WordPressサイトのワードカウントを取得したい理由はたくさんあります。
フリーランスのライターなら、単語ごとに料金を請求するかもしれないし、クライアントが厳しい単語数目標を設定しているかもしれない。
WordPressブログに複数の投稿者を追加している場合、その投稿者のワード数統計をモニタリングすることで、サイトに最も貢献している投稿者を特定することができます。
この洞察は、複数著者のWordPressブログをより効率的に管理するのに役立ちます。例えば、ワード数が最も多い投稿者に報酬を与えたり、成績不振のライターとのミーティングを予定したりすることができます。
サイトで作業しているのがあなた一人であっても、単語数の統計は興味深いものです。ワード数が時間とともにどのように変化するかを見ることで、パターンを発見し、より生産的になる方法を見つけることができるかもしれません。
すべてを念頭に置いて、WordPressでワードカウント統計を取得するいくつかの異なる方法を見てみましょう。特定の方法に直接ジャンプしたい場合は、以下のリンクをご利用ください。
動画チュートリアル
文章での説明がお望みなら、このまま読み進めてほしい。
方法1.WordPressで投稿記事の単語数を確認する方法
WordPressのブロックエディターでは、ページや投稿の単語数を簡単に確認することができます。
画面上部の「i」アイコンをクリックするだけで、WordPressは単語数を含むページや投稿の基本的な統計情報を表示します。
さらに良いことに、この単語数は書くたびに自動的に更新される。
もしあなたが字数制限を設けているのであれば、これは制限を超えないようにするための手軽で簡単な方法です。
方法2.プラグインでWordPressの詳細なワードカウント統計を取得する。
特定の投稿者、投稿タイプ、あるいはサイト全体のワードカウント統計を見たい場合もあるでしょう。
これらの詳細な統計情報を取得する最も簡単な方法は、WP Word Countプラグインを使用することです。このプラグインは、月、投稿者、投稿タイプに基づいて何ワード書いたかを表示します。
カスタム投稿タイプを使用している場合、WP Word Countはカスタム投稿の統計も表示できます。
まず、プラグインをインストールして有効化する必要があります。WordPressプラグインのインストール方法については、こちらをご覧ください。
それが済んだら、Word Count ” Statisticsに進みます。統計を取る前に、「計算」リンクをクリックする必要があります。
WP Word Countは、すべてのコンテンツの単語数をカウントするか、特定の日付範囲内に作成されたコンテンツのみをカウントするかを尋ねます。
サイト全体の総単語数を計算するには、「このサイトのすべてのコンテンツを一度にカウントする」オプションをクリックします。次に、「ワードカウントを計算する」をクリックします。
しばらくすると、「Word counts calculated successfully」というメッセージが表示されます。
WP Word Countは、サイトに投稿やページを追加すると自動的に統計情報を計算し続けます。つまり、最新のワードカウント統計を見るために毎回「計算」リンクをクリックする必要がなくなります。
これで、いつでも統計情報を見ることができます。すべてのコンテンツの総単語数を見るには、「すべてのコンテンツ」タブをクリックします。
この画面では、投稿タイプを公開するコンテンツと未公開のコンテンツに分けて、合計ワード数が表示されます。
総単語数」は、すべてのコンテンツの総単語数です。
この数字は、公開するコンテンツと未公開のコンテンツの両方を合わせたものなので、必ずしもサイト訪問者が実際に目にする文字数とは限りません。
この画面では、公開するコンテンツと未公開コンテンツのワード数も区切りで表示されます。
特定の月の単語数を見たい場合は、「月間統計」タブをクリックするだけです。これにより、最も生産性の高い月や、他の月に比べて書いた語数が少なかった時期などの傾向を把握することができます。
WordPressブログに複数の人が執筆している場合は、「投稿者統計」タブを見てみるとよいでしょう。
これにより、投稿者別にサイトの語数統計を調べることができます。
また、各投稿者があなたのサイトにもたらすトラフィックをトラッキングしたい場合もあるでしょう。そのためには、WordPressで投稿者トラッキングを設定する方法をご覧ください。
WordPressサイトでこれらの重要な指標を監視することで、あなたのサイトで何がうまくいっていて、何がうまくいっていないかを特定することができます。
そして、この洞察を使ってコンテンツカレンダーを微調整し、さらに多くの訪問者をサイトに呼び込み、WordPressを使ってオンラインでブログを書いてお金を稼ぐことができます。
方法3.コードを使ってWordPressに単語数を追加する方法
単語数をトラッキングするもう一つのオプションは、コードによる解決策です。このコード・スニペットは、投稿日 ” すべての投稿画面の各投稿の次の投稿に単語数を表示します。
これは、あなたのサイトで最も長い投稿を見つけたり、必要な単語数を満たしていない投稿をチェックしたりする簡単な方法です。
すべての投稿日: 画面に単語数を表示するには、サイトにコードを追加する必要があります。サイト固有のプラグインを作成するか、コードスニペットプラグインを使用することをお勧めします。
どのオプションを設定するにしても、以下のコードを追加する必要がある:
add_filter('manage_posts_columns', 'wpbeginner_add_column');
function wpbeginner_add_column($wpbeginner_wordcount_column) {
$wpbeginner_wordcount_column['wpbeginner_wordcount'] = 'Word Count';
return $wpbeginner_wordcount_column;
}
//Link the word count to our new column//
add_action('manage_posts_custom_column', 'wpbeginner_display_wordcount');
function wpbeginner_display_wordcount($name)
{
global $post;
switch ($name)
{
case 'wpbeginner_wordcount':
//Get the post ID and pass it into the get_wordcount function//
$wpbeginner_wordcount = wpbeginner_get_wordcount($post->ID);
echo $wpbeginner_wordcount;
}
}
function wpbeginner_get_wordcount($post_id) {
//Get the post, remove any unnecessary tags and then perform the word count//
$wpbeginner_wordcount = str_word_count( strip_tags( strip_shortcodes(get_post_field( 'post_content', $post_id )) ) );
return $wpbeginner_wordcount;
}
その後、変更を保存することができます。
これで、投稿 ” すべての投稿画面にアクセスすると、新しい列に単語数が表示されます。
WordPressでワード数を取得する方法について、このガイドがお役に立てれば幸いです。また、WordPressサイトにGoogleアナリティクスの目標を設定する方法を学んだり、中小企業に最適なメールマーケティングサービスのリストをチェックしたりすることもできます。
If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.
Syed Balkhi says
Hey WPBeginner readers,
Did you know you can win exciting prizes by commenting on WPBeginner?
Every month, our top blog commenters will win HUGE rewards, including premium WordPress plugin licenses and cash prizes.
You can get more details about the contest from here.
Start sharing your thoughts below to stand a chance to win!
Jiří Vaněk says
Thank you for the guide, I’ll try using the snippet because I don’t want to unnecessarily go the route of an external plugin and burden WordPress. Since I sometimes post short updates on the website, I still try to maintain a minimum article length of 300 words. Until now, I used to write articles in LibreOffice first to see the word count. Now I won’t have to
WPBeginner Support says
You’re welcome, in case it was a concern, not all plugins cause a slowdown on your site, we would recommend taking a look at our article below for more on this:
https://www.wpbeginner.com/opinion/how-many-wordpress-plugins-should-you-install-on-your-site/
管理者
Bernardo K. says
Awesome. We are using the code block and it is working very good.
WPBeginner Support says
Glad to hear the code is working!
管理者
WPBeginner Support says
You would want to try checking under the document overview section in the outline tab.
管理者
Dave says
The ‘i’ icon is missing with 6.2 update. Can’t find it anywhere. Any ideas?
Shelley Johnson says
The little ‘i’ icon is gone! How do I get it back?
WPBeginner Support says
You would want to check the top-right under the … and check your preferences. If ‘Reduce the interface’ is enabled then that is the most likely reason why you don’t see it.
管理者
john says
Thanks for the code (method 3). Is there a way to make the column sortable by clicking header?
WPBeginner Support says
Not at the moment but we will look into the possibility for the future.
管理者
Shardha says
How can we count total number of another competitor’s website?? Suppose a website has 30 articles, how can we count total number of words in those 30 articles, since it is other’s website?
WPBeginner Support says
We do not have a recommended method for that at this time.
管理者
Melanie says
i cannot find the widget to count words, help!
WPBeginner Support says
You would want to reach out to the plugin’s support to see if it is an error with the plugin itself.
管理者
Ricard says
Thanks for the post! Great info! But as always I’d like to know more and more :D. Is there any method to know how many words have all the comments (approved) in a post, or in all posts of some category… or even all the posts in your website.
Thanks!!
WPBeginner Support says
We do not have a recommended method for that at the moment.
管理者
Haley Hines says
I’ve integrated user profiles into the sidebar of my site. I’d like to pull how many words that specific user has written into the profile. Is there an easy way to do this since I have this plugin installed?
Christian Karasiewicz says
Now if only this would integrate with Google Analytics to show authors how well their posts were performing.
Amy says
Really informative, thanks.
Gretchen Louise says
The writers at my contributor blog are going to love seeing the stats from this!
Editorial Staff says
Yes, this is a pretty nuts stat when you look at it.
管理者
Jigar Doshi says
I would love to check-out the plugin and check for myself the total number of words I’ve written over-all.
But, I’m not really sure I would like to show it to the whole world.
[P.S : I would only prefer showing the total pageviews to the world :P]
Editorial Staff says
Jigar, you don’t have to show the count to the whole world. You can just use it for your personal use in the admin panel.
管理者