Trusted WordPress tutorials, when you need them most.
Beginner’s Guide to WordPress
WPBカップ
25 Million+
Websites using our plugins
16+
Years of WordPress experience
3000+
WordPress tutorials
by experts

WordPressで単語数を取得する方法(3つの方法)

編集メモ: WPBeginner のパートナーリンクから手数料を得ています。手数料は編集者の意見や評価に影響を与えません。編集プロセスについて詳しく知る。

WordPressで単語数の統計を取りたいですか?

投稿を書く際、目標語数が決まっている場合があります。さらに、単語数の統計をモニタリングすることで、どの投稿の長さが最もトラフィックやエンゲージメントを獲得できるかなどのインサイトを得ることができます。

この投稿では、WordPressで詳細な単語数の統計情報を表示する方法を紹介します。

How to get word count stats in WordPress

なぜWordPressサイトのワードカウント統計を取るのか?

WordPressサイトのワードカウントを取得したい理由はたくさんあります。

フリーランスのライターなら、単語ごとに料金を請求するかもしれないし、クライアントが厳しい単語数目標を設定しているかもしれない。

WordPressブログに複数の投稿者を追加している場合、その投稿者のワード数統計をモニタリングすることで、サイトに最も貢献している投稿者を特定することができます。

この洞察は、複数著者のWordPressブログをより効率的に管理するのに役立ちます。例えば、ワード数が最も多い投稿者に報酬を与えたり、成績不振のライターとのミーティングを予定したりすることができます。

サイトで作業しているのがあなた一人であっても、単語数の統計は興味深いものです。ワード数が時間とともにどのように変化するかを見ることで、パターンを発見し、より生産的になる方法を見つけることができるかもしれません。

すべてを念頭に置いて、WordPressでワードカウント統計を取得するいくつかの異なる方法を見てみましょう。特定の方法に直接ジャンプしたい場合は、以下のリンクをご利用ください。

動画チュートリアル

Subscribe to WPBeginner

文章での説明がお望みなら、このまま読み進めてほしい。

方法1.WordPressで投稿記事の単語数を確認する方法

WordPressのブロックエディターでは、ページや投稿の単語数を簡単に確認することができます。

画面上部の「i」アイコンをクリックするだけで、WordPressは単語数を含むページや投稿の基本的な統計情報を表示します。

Getting the word count in the WordPress block editor

さらに良いことに、この単語数は書くたびに自動的に更新される。

もしあなたが字数制限を設けているのであれば、これは制限を超えないようにするための手軽で簡単な方法です。

方法2.プラグインでWordPressの詳細なワードカウント統計を取得する。

特定の投稿者、投稿タイプ、あるいはサイト全体のワードカウント統計を見たい場合もあるでしょう。

これらの詳細な統計情報を取得する最も簡単な方法は、WP Word Countプラグインを使用することです。このプラグインは、月、投稿者、投稿タイプに基づいて何ワード書いたかを表示します。

カスタム投稿タイプを使用している場合、WP Word Countはカスタム投稿の統計も表示できます。

まず、プラグインをインストールして有効化する必要があります。WordPressプラグインのインストール方法については、こちらをご覧ください。

それが済んだら、Word Count ” Statisticsに進みます。統計を取る前に、「計算」リンクをクリックする必要があります。

Calculating the word count for your WordPress website

WP Word Countは、すべてのコンテンツの単語数をカウントするか、特定の日付範囲内に作成されたコンテンツのみをカウントするかを尋ねます。

サイト全体の総単語数を計算するには、「このサイトのすべてのコンテンツを一度にカウントする」オプションをクリックします。次に、「ワードカウントを計算する」をクリックします。

Getting word count stats in WordPress

しばらくすると、「Word counts calculated successfully」というメッセージが表示されます。

WP Word Countは、サイトに投稿やページを追加すると自動的に統計情報を計算し続けます。つまり、最新のワードカウント統計を見るために毎回「計算」リンクをクリックする必要がなくなります。

これで、いつでも統計情報を見ることができます。すべてのコンテンツの総単語数を見るには、「すべてのコンテンツ」タブをクリックします。

この画面では、投稿タイプを公開するコンテンツと未公開のコンテンツに分けて、合計ワード数が表示されます。

Word count statistics in the WordPress dashboard

総単語数」は、すべてのコンテンツの総単語数です。

この数字は、公開するコンテンツと未公開のコンテンツの両方を合わせたものなので、必ずしもサイト訪問者が実際に目にする文字数とは限りません。

The WP Word Count plugin

この画面では、公開するコンテンツと未公開コンテンツのワード数も区切りで表示されます。

特定の月の単語数を見たい場合は、「月間統計」タブをクリックするだけです。これにより、最も生産性の高い月や、他の月に比べて書いた語数が少なかった時期などの傾向を把握することができます。

Monthly word count stats in WordPress

WordPressブログに複数の人が執筆している場合は、「投稿者統計」タブを見てみるとよいでしょう。

これにより、投稿者別にサイトの語数統計を調べることができます。

Author word count statistics in WordPress

また、各投稿者があなたのサイトにもたらすトラフィックをトラッキングしたい場合もあるでしょう。そのためには、WordPressで投稿者トラッキングを設定する方法をご覧ください。

WordPressサイトでこれらの重要な指標を監視することで、あなたのサイトで何がうまくいっていて、何がうまくいっていないかを特定することができます。

そして、この洞察を使ってコンテンツカレンダーを微調整し、さらに多くの訪問者をサイトに呼び込み、WordPressを使ってオンラインでブログを書いてお金を稼ぐことができます。

方法3.コードを使ってWordPressに単語数を追加する方法

単語数をトラッキングするもう一つのオプションは、コードによる解決策です。このコード・スニペットは、投稿日 ” すべての投稿画面の各投稿の次の投稿に単語数を表示します。

Adding a word count to the WordPress dashboard

これは、あなたのサイトで最も長い投稿を見つけたり、必要な単語数を満たしていない投稿をチェックしたりする簡単な方法です。

すべての投稿日: 画面に単語数を表示するには、サイトにコードを追加する必要があります。サイト固有のプラグインを作成するか、コードスニペットプラグインを使用することをお勧めします。

どのオプションを設定するにしても、以下のコードを追加する必要がある:

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.

情報開示 私たちのコンテンツは読者支援型です。これは、あなたが私たちのリンクの一部をクリックした場合、私たちはコミッションを得ることができることを意味します。 WPBeginnerの資金源 をご覧ください。3$編集プロセスをご覧ください。

Avatar

Editorial Staff at WPBeginner is a team of WordPress experts led by Syed Balkhi with over 16 years of experience in WordPress, Web Hosting, eCommerce, SEO, and Marketing. Started in 2009, WPBeginner is now the largest free WordPress resource site in the industry and is often referred to as the Wikipedia for WordPress.

究極のWordPressツールキット

ツールキットへの無料アクセス - すべてのプロフェッショナルが持つべきWordPress関連製品とリソースのコレクション!

Reader Interactions

24件のコメント返信を残す

  1. 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!

  2. 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 :)

  3. WPBeginner Support says

    You would want to try checking under the document overview section in the outline tab.

    管理者

    • 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.

      管理者

  4. 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

      You would want to reach out to the plugin’s support to see if it is an error with the plugin itself.

      管理者

  5. 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!!

  6. 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?

  7. Christian Karasiewicz says

    Now if only this would integrate with Google Analytics to show authors how well their posts were performing.

  8. 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]

返信を残す

コメントありがとうございます。すべてのコメントは私たちのコメントポリシーに従ってモデレートされ、あなたのメールアドレスが公開されることはありませんのでご留意ください。名前欄にキーワードを使用しないでください。個人的で有意義な会話をしましょう。