How to Lazy Load Comments in WordPress

How to Lazy Load WordPress Comments

If you are looking for a way to enable the ‘click to load comments’ option for your website, you have come to the right place. Lazy loading the comment pages improves your website’s loading time for the users. This method of loading comments on request is not new as it has already been implemented long back by various news websites and websites which receive a lot of comments from their readers.

Why Lazy Load WordPress Comments?

Though comments are very important for any blog, it should also be noted that it increases the page size considerably and slows down the page. More time the site takes to load, it negatively affects your SEO efforts. Since people do not like visiting websites which slow down to a crawl, search engines such as Google too hates it and pushes the site down their search engine results page (SERP).

You may also want to follow my steps to optimize WordPress to reduce server load. By lazy loading WordPress comments, you can significantly improve the page load times for your articles by making the article load quickly on mobile devices and places where the internet connection is slow.

Adding Lazy Load for WordPress Comments

Step 1 – Install and activate the Lazy Load for Comments plugin from your WordPress dashboard.

Step 2 – Once activated, navigate to the Settings –> Discussion page  to configure the plugin settings.

Lazy Load Comments - On Scroll

Step 3 – Click on the drop down menu to choose the method of lazy loading you want to implement. There are two available options – On Scroll (default) and On Click.

NOTE: If you choose the ‘On Scroll’ method, the comments will be automatically loaded when the visitor scrolls down to the end of the post. Else if you choose the ‘On Click’ method, the comments will be loaded only when the user clicks on the ‘load comments’ button at the end of the post.

Lazy Load Comments On Scroll Preview

On Scroll Preview

Lazy Load Comments On Click Preview

On Click Preview

Step 4 – Click on the save changes button at the end of the page to store the changes you have made successfully.

You can now visit any post on your site and depending on the setting you chose either the comments will be loaded on scroll or a ‘load comments’ button will be displayed. In my case (on my demo site), I chose the ‘On Click’ method –

Load Comments on click

Pretty right?

Thus I hope this post helped you in learning how to easily lazy load comments in WordPress. If you liked this, you may also want to checkout my review of Sucuri – a security platform for website owners which comes with a 30 days money-back guarantee.

Advertisements

10 thoughts on “How to Lazy Load Comments in WordPress

    • True that Harish. Not many people give enough attention to how long their comment pages are. Posts with a whole lot of comments take quite some time to load fully and negatively impacts the user experience on the site.

      Liked by 1 person

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s