How to Paginate Comments in WordPress
Paginating comments in WordPress is a great idea when you start having a lot of comments. WordPress makes it easy to paginate comments and add your own styling to it to truly customize the experience. In this article I’ll show you how to paginate comments in WordPress step-by-step.
There are a few key reasons why you should paginate comments in WordPress. Here are the top reasons:
Comments can slow down your page.
If you display all your comments you run the risk of slowing down the page. This could negatively impact your ranking in search engines.
However, If you believe your comments section is adding significant value you may want to keep it the way it is. It’s worth checking your site speed on GTMetrix to see where you’re at, and if you can improve.
Comments will lower your keyword density.
Comments introduce a lot of content into your article. Even though it’s not really part of the article, search engines consider it part on the page’s content. All this content affects your keyword density for the target keyword you want to rank for.
One potential problem
Turning pagination of comments has one SEO problem that you need to be aware of. When you click to view the next set of comments, the page loads and shows you the same article with the new comments. This can result in duplicate content which can impact your SEO.
The fix for this is to generate canonical URLs but if you’re using an SEO plugin like Yoast it is already done for you. I wanted to mention this so you are not in the dark about it.
How to paginate comments in WordPress
First, log in to your WordPress dashboard. From there, head over to Settings > Discussion and click to go to the page. This page deals with comment settings for your WordPress website. Find the ‘Other comment settings’ section and do the following:
- Check the box next to ‘Break comments into pages with’
- Enter a number in the next box which will be the number of comments shown per page before pagination kicks in.
- Choose comments sorting in the next dropdown. If you select to show the last page then the comments are sorted in descending order. If you choose to show the first page then comments will be sorted in ascending order.
- Lastly, choose to display comments on a page with newest or oldest at the top.
That’s all there is to it. Visit the article with a lot of comments and review the pagination. Depending on your theme, you will see either numbers for pagination or simple previous and next links. Try it out and let me know how it goes for you in the comments below. Lastly, check out the following link if you’d like more how to WordPress articles.