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でコメントをページ送りする方法(ステップバイステップ)

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

サイト上のコメントを複数のページに分割したいですか?

あなたのサイトにたくさんのコメントが寄せられるなら、それはユーザーがあなたのコンテンツに夢中になっている証拠です。しかし、これらのコメントをすべて個別ページに表示すると、WordPressサイトの表示速度が遅くなる可能性があります。そこで、ページ送りが役立ちます。

この投稿では、WordPressでコメントをページ送りすることで、投稿の読み込み時間を短縮する方法を紹介する。

Paginate comments in WordPress

なぜWordPressでコメントをページ送りする必要があるのか?

コメントの多いブログ投稿は、読み込みに時間がかかることにお気づきですか?個別ページに多数のコメントを表示すると、WordPressホスティングサービスのサーバーに負担がかかります。

これはサーバーのメモリを使い果たし、訪問者に死の白い画面を見せる原因となります。

Googleのような検索エンジンは、WordPressのスピードとパフォーマンスをランキング要因として使用します。つまり、コメントする数が多いと、WordPressのSEOにも悪影響があるということです。

さらに、コメントは投稿に多くのコンテンツを追加しますが、常にターゲットキーワードを含むわけではありません。これはキーワードとコンテンツの比率に影響し、検索エンジンが適切なキーワードで投稿をインデックスするのを止めてしまう可能性がある。

このことを念頭に置いて、WordPressでコメント欄をページ送りする方法を見てみましょう。

WordPressのコメント欄をページに分割する方法

まず最初にWordPressの管理エリアにログインし、設定 ” ディスカッションのページに移動します。

Changing your WordPress discussion settings

ここで、「コメントをページに分割する」を見つけ、その横のボックスにチェックを入れる。

WordPressブログの各ページに表示したいコメント数を入力できるようになりました。

Adding comment pagination to your WordPress website

また、「初期設定で表示される最初のページ/最後のページ」ドロップダウンメニューを使用して、最も古いコメントページを最初に表示するか、最も新しいコメントページを最初に表示するかを変更することができます。

その後、’Comments should be displayed with the…’ドロップダウンメニューを使用して、各ページで最も古いコメントを最初に表示するか、新しいコメントを最初に表示するかを変更することができます。

ページ送りの設定に満足したら、画面を一番下までスクロールして「変更を保存」をクリックするだけです。

Clicking the 'Save Changes' button on the WordPress Discussion settings page

それだけだ!

コメントがたくさんある投稿にアクセスすると、ページ送りが表示されるはずだ。

WordPress Comments Pagination in WPBeginner

コメントと同様に、WordPressの投稿を複数のページにページ送りすることもできます。このトピックについては、WordPressの投稿を複数のページに分割する方法の投稿でさらに詳しく説明しています。

WordPressのコメントページ送りを最適化する方法

WordPressのコメントをページ送りすることで、サイトのパフォーマンスの問題を防ぐことができます。しかし、適切に使用されていない場合、重複コンテンツを作成する可能性もあります。これは、あなたのサイトをスパム的に見せ、検索エンジンを混乱させる可能性があります。

All In One SEO (AIOSEO)を使えば、この問題を簡単に解決できる。SEOの経験がなくても、簡単にサイトを検索エンジンに最適化できる最高のWordPress SEOプラグインだ。

All in One SEO website

初期設定では、AIOSEOはページ送りコンテンツのSEOタイトルに自動的にページ番号を追加します。

こうすることで、検索エンジンはコメント欄が複数のページにまたがっており、個別ページの重複ではないことを理解しやすくなる。

The AIOSEO settings page

検索エンジンがどのページが最も重要かを知るために、AIOSEOはコメントするページのURLからこれらのページ番号を削除します。

言い換えれば、コメントを多くのページに分割した場合、AIOSEOは検索エンジンがどのページが最初に見るべきメインページであるかを知るのを助ける。これは、’No Pagination for Canonical URLs’設定を自動的にオンにすることで実現します。

AIOSEO's no pagination for canonical URLs setting

AIOSEOを使い始めるために、AIOSEO for WordPressの設定方法をご覧ください。

ボーナスヒント:Thriveテーマでコメントする力を高める

コメントをページ送りすることで、サイトのパフォーマンスを大幅に向上させることができますが、より良いユーザーエクスペリエンスのためにコメント欄を最適化するためにできることは他にもあります。

ここでThrive Themesによる強力なコメントプラグイン、Thrive Commentsが役に立つ。

このプラグインにはコメントを遅延ロードする機能があります。これにより、ページ全体のロード時間が短縮され、特に多数のコメントがあるページでは、ページ送りの速度の利点をサポートします。

Enabling lazy loading in Thrive Comments

このプラグインは、コメントフォームからサイトURLフィールドを削除することもできます。このフィールドは、悪意のあるリンクを挿入するためにスパマーによく使われます。これらのリンクは、あなたのサイトに害を与えるだけでなく、コメントする人を惑わすこともあります。

さらに、Thrive Commentsはコメントする機能を提供します。これにより、参加者すべてにとって常に生産的でポジティブなコメント欄をキュレーションすることができます。

このプラグインについては、Thrive Themesのレビューでさらに詳しくご紹介しています。

このチュートリアルがWordPressでコメントをページ送りするのにお役に立てば幸いです。WordPressでコメントスパムに対抗する方法や、エンゲージメントを高めるWordPressコメントプラグインのリストもご覧ください。

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

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

  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 clarification regarding SEO optimization. It didn’t occur to me that a search engine could rate such content as duplicate. I have AIO SEO and have set it up according to your recommendation.

  3. Duncan Shaw says

    Hey, do you know if you can have comments paginate according to the date of the comments?

    Eg. Comments on page 3 for 28/07, Comments on page 2 for 29/07, Comments on page 1 for 30/07

    • WPBeginner Support says

      We do not have a recommended method at the moment for that and if you wanted users to have conversations it would normally be best not to separate comments by date.

      管理者

  4. Thien Nhan says

    Hi,

    I did follow these steps to split 20 comments per pages but the comment did not break into pages. It still showed all 30 comments in one page.

    Is there any idea why?

    Thank you.

    • WPBeginner Support says

      You would want to start by clearing your cache and if it’s not a caching issue you would likely need to check with your theme to ensure the theme you’re using does not try to override that setting.

      管理者

  5. brian says

    As far as I read and I understand paginate comments will create duplicate content.. So it’s not recommended at all to paginate comments.

    • WPBeginner Support says

      Most SEO plugins set up a canonical link on the paginated comment pages to point to the correct post for search engines.

      管理者

  6. Sonu says

    How can we show the new comment to user (which he just added) if we are using W3 total cache?
    The page is cached for 3 hours using browser Cache.

    Do you know of a plugin that probably uses wordpress JSON api to communicate and add comments to wp database.

    • WPBeginner Support says

      For the method the plugins use, you would want to reach out to the specific plugin. You may want to take a look at WP Rocket for what it sounds like you’re looking for.

      管理者

  7. Nick Corcodilos says

    This setting blew up my comments entirely once the number of comments got large — like over 100. It did not paginate — instead, it STOPPED DISPLAYING the first 100 comments altogether, with no option for the user to go to the page to view older comments. Suddenly, where I had 157 comments on a post (and it SAID 157 Comments up at the top), only 27 were showing. I turned this setting OFF altogether and all my comments came back.

    I’m using WordPress 4.4.2. This is a serious bug.

  8. TJ says

    One negative of WordPress split page comments is what happens when the comments-per-page tipping point is reached? The default, canonical page will end up showing just one comment.

    For instance, let’s say it’s set to show 10 comments per page and there are 21 comments. Well, the default, canonical page that 99.9% of folks visit will only show the 21st comment, while the previous page will hold the other 20. This can be confusing and looks bad. It would be preferable for the primary page to always show the maximum number of comments per page, but WordPress doesn’t make this possible without putting together a complicated class that extends the Walker_Comment class.

    • malcolm says

      I have this exact same problem and it’s very frustrating. Like you say, it makes the comments look ridiculous if a post says at the top it has 103 comments, but then the reader scrolls down and sees there are just 3.
      Does anyone know a way around this?

返信を残す

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