Title: Lazy Load for Comments
Author: Joel James
Published: <strong>21. juli, 2016</strong>
Last modified: 18. september, 2026

---

Søg plugins

![](https://ps.w.org/lazy-load-for-comments/assets/banner-772x250.png?rev=3547560)

![](https://ps.w.org/lazy-load-for-comments/assets/icon.svg?rev=3548143)

# Lazy Load for Comments

 Af [Joel James](https://profiles.wordpress.org/joelcj91/)

[Download](https://downloads.wordpress.org/plugin/lazy-load-for-comments.2.1.0.zip)

 * [Detaljer](https://da.wordpress.org/plugins/lazy-load-for-comments/#description)
 * [Vurderinger](https://da.wordpress.org/plugins/lazy-load-for-comments/#reviews)
 *  [Installation](https://da.wordpress.org/plugins/lazy-load-for-comments/#installation)
 * [Udvikling](https://da.wordpress.org/plugins/lazy-load-for-comments/#developers)

 [Support](https://wordpress.org/support/plugin/lazy-load-for-comments/)

## Beskrivelse

Comments are heavy. A long thread can pull in dozens of avatars, gravatar lookups
and reply scripts — all of which the browser downloads before the visitor has even
reached them. **Lazy Load for Comments** defers all of that until the visitor either
scrolls to the comments area or clicks a button.

The result: fewer HTTP requests, faster Largest Contentful Paint and a happier Lighthouse
score, without changing how your comment template looks.

Version 2.0 is a complete rewrite. It uses the WordPress REST API to fetch the rendered
comments on demand and works with both **classic themes** (`comments_template()`)
and **block themes** (the core Comments block) out of the box.

> 
> #### Features
> 
>  * Lazy-load comments on scroll, on button click, or turn the plugin off without
>    deactivating it.
>  * Works with classic themes and block themes (the core Comments block).
>  * Loads comments inline for search engine crawlers, so indexing and SEO are not
>    affected.
>  * Per-post cache of the rendered Comments block — REST renders stay fast.
>  * Minimum-comment-count threshold so short threads still render inline.
>  * Customisable load-button text, style and extra CSS classes.
>  * Clean React settings page under _Comments  Lazy Load_.
>  * No jQuery dependency. Front-end script is vanilla JS and intentionally small.
>  * Translation-ready. Hooks and filters available for further customisation.

**Useful links**

 * [Plugin website](https://foxelabs.com/software/plugins/lazy-load-for-comments/)
 * [Documentation](https://docs.foxelabs.com/software/lazy-load-for-comments/getting-started)
 * [Support forum](https://wordpress.org/support/plugin/lazy-load-for-comments/)

## Skærmbilleder

[⌊Loading behaviour settings.⌉⌊Loading behaviour settings.⌉[

Loading behaviour settings.

[⌊Load button settings.⌉⌊Load button settings.⌉[

Load button settings.

[⌊Cache management.⌉⌊Cache management.⌉[

Cache management.

## Installation

**From the WordPress admin (recommended)**

 1. Go to _Plugins  Add New_, search for **Lazy Load for Comments** and click _Install
    now_.
 2. Activate the plugin.
 3. Open _Comments  Lazy Load_ and pick the load method that suits you.

**Manual install**

 1. Upload the `lazy-load-for-comments` folder to `/wp-content/plugins/`.
 2. Activate the plugin from the _Plugins_ screen.
 3. Open _Comments  Lazy Load_ to configure the settings.

For the full configuration guide, see the [official documentation](https://docs.foxelabs.com/software/lazy-load-for-comments/loading-behaviour).

## FAQ

### Does it work with block themes?

Yes. The plugin detects whether the active theme is a block theme and either swaps
the classic `comments_template()` output or replaces the rendered `core/comments`
block, whichever applies.

### Will it work with my caching plugin?

Yes. The placeholder rendered server-side is plain HTML, so full-page caches can
cache it safely. The actual comments are fetched from a public REST endpoint, which
is also cache-friendly.

### How do I change the load method?

Open _Comments  Lazy Load_ and pick one of **On scroll**, **On button click** or**
Disabled** on the _Settings_ tab.

### How do I customise the load button?

The button text, the style (inherit your theme’s style or use the plugin’s built-
in style) and extra CSS classes can all be set under _Load Button_ on the _Settings_
tab.

### Does it support comment plugins like Disqus or Jetpack Comments?

No — this plugin only handles the **default** WordPress comments. Third-party comment
systems (Disqus, Jetpack Comments, etc.) replace the comment area entirely, so there
is nothing for this plugin to lazy-load.

### How do I disable lazy loading for a specific post or page?

Use the `lazy_load_for_comments_can_lazy_load` filter:

    ```
    add_filter( 'lazy_load_for_comments_can_lazy_load', function ( $can ) {
        if ( is_page( 'contact' ) ) {
            return false;
        }
        return $can;
    } );
    ```

### Are comments still indexed by Google?

Yes. By default the plugin detects search-engine crawlers from the User-Agent and
serves them the original (inline) comments markup, so indexing is not affected. 
You can turn this behaviour off on the _Settings_ tab if you’d rather always lazy-
load.

### Where can I get help?

The [official documentation](https://docs.foxelabs.com/software/lazy-load-for-comments/getting-started)
covers most setups. For everything else, the free [WordPress.org support forum](https://wordpress.org/support/plugin/lazy-load-for-comments/)
is the best place to start.

## Anmeldelser

![](https://secure.gravatar.com/avatar/fe1bfa9f9de47f01677355551b004a52173737b618915675e0b756036b267f66?
s=60&d=retro&r=g)

### 󠀁[Has Potential](https://wordpress.org/support/topic/has-potential-29/)󠁿

 [Emory Rowland](https://profiles.wordpress.org/emory/) 24. februar, 2024

But support is unresponsive.

![](https://secure.gravatar.com/avatar/37d077972318559a07259d6951668e0496cbfec95e5eb85c773c77dc7177d309?
s=60&d=retro&r=g)

### 󠀁[Good, but needs some enhancements](https://wordpress.org/support/topic/no-fuss-no-muss-3/)󠁿

 [itsryu](https://profiles.wordpress.org/itsryu/) 8. februar, 2022

It breaks the Moderation notice. The user just gets sent back to the main page and
they don't know if their comment submitted or not. In my analytics, it states that
there is a javascript error, so that needs to be fixed. It also breaks the built
in discussion settings of breaking the comments into groups, and the feature of 
clicking "next" to get the next batch Other than that it works. Simple plugin without
options.

![](https://secure.gravatar.com/avatar/0bfe4e26f13c5b965a700860a5d92c262f25e35e7764c61bfe5a6db6f0afb310?
s=60&d=retro&r=g)

### 󠀁[Amazing plugin](https://wordpress.org/support/topic/amazing-plugin-1999/)󠁿

 [yastychef](https://profiles.wordpress.org/yastychef/) 27. september, 2021

Great plugin, works fine. I just hope it always gets updated. Keep up the great 
work!

![](https://secure.gravatar.com/avatar/c609c78e1ecaedb1621498ede4d1f5997275548c9bf608d35e47e6fbcefbcbf0?
s=60&d=retro&r=g)

### 󠀁[Best Plugin I’ve ever used](https://wordpress.org/support/topic/best-plugin-ive-ever-used-9/)󠁿

 [fernandroid3](https://profiles.wordpress.org/fernandroid3/) 22. marts, 2021

Congratulations and thank you very much for this wonderful plugin, my website has
a lot of comments, several times the vps cpu reached 100% of use on the pages with
many comments, this plugin is wonderful, excellent.

![](https://secure.gravatar.com/avatar/954b3db263248226fc0e8a7f098cd9c351c9ac732c34fa708084f33f7fe4ee2f?
s=60&d=retro&r=g)

### 󠀁[Отличный плагин!](https://wordpress.org/support/topic/%d0%be%d1%82%d0%bb%d0%b8%d1%87%d0%bd%d1%8b%d0%b9-%d0%bf%d0%bb%d0%b0%d0%b3%d0%b8%d0%bd-667/)󠁿

 [westgen](https://profiles.wordpress.org/westgen/) 27. februar, 2021

Спасибо за отличный плагин! Это то, что я искал.

![](https://secure.gravatar.com/avatar/dc42e862d2892c023325bc78bc1a1e949b1cfe7a4335da57e084e4c69ada85c1?
s=60&d=retro&r=g)

### 󠀁[Just what I needed](https://wordpress.org/support/topic/just-what-i-needed-1027/)󠁿

 [janaa](https://profiles.wordpress.org/janaa/) 2. oktober, 2020

Just what I needed, and it didn't slow down my webpages!

 [ Læs alle 28 anmeldelser ](https://wordpress.org/support/plugin/lazy-load-for-comments/reviews/)

## Bidragsydere & udviklere

“Lazy Load for Comments” er open source-software. Følgende personer har bidraget
til dette plugin.

Bidragsydere

 *   [ Joel James ](https://profiles.wordpress.org/joelcj91/)
 *   [ Foxe Labs ](https://profiles.wordpress.org/foxelabs/)

“Lazy Load for Comments” er blevet oversat til 6 sprog. Tak til [oversætterne](https://translate.wordpress.org/projects/wp-plugins/lazy-load-for-comments/contributors)
for deres bidrag.

[Oversæt “Lazy Load for Comments” til dit eget sprog.](https://translate.wordpress.org/projects/wp-plugins/lazy-load-for-comments)

### Interesseret i udvikling?

[Gennemse koden](https://plugins.trac.wordpress.org/browser/lazy-load-for-comments/),
tjek [SVN repository](https://plugins.svn.wordpress.org/lazy-load-for-comments/),
eller abonner på [udviklerloggen](https://plugins.trac.wordpress.org/log/lazy-load-for-comments/)
via [RSS](https://plugins.trac.wordpress.org/log/lazy-load-for-comments/?limit=100&mode=stop_on_copy&format=rss).

## Ændringslog

#### 2.1.0

 * Moved the plugin to the Foxe Labs brand. The PHP namespace is now `FoxeLabs\LazyComments\`(
   was `DuckDev\LazyComments\`) and the Composer package is `foxelabs/lazy-load-
   for-comments`. The old class names still resolve, so existing add-ons and custom
   templates keep working — but they are deprecated and will be removed in a future
   version.
 * No changes to hooks, filters, option names or settings. Nothing to do after updating.

#### 2.0.2

 * Fixed comments failing to load on sites behind a full-page cache (Cloudflare,
   host-level page caching). The REST nonce embedded in the cached page expired 
   while the page was still being served, and WordPress rejected the request with
   a 403 before the public endpoint was reached. Logged-out visitors are no longer
   sent a nonce, and a stale nonce is now retried without the header.

#### 2.0.1

 * Fixed comments not rendering on Genesis and similar classic themes that rely 
   on `comments_template()` populating `comments_by_type`.

#### 2.0.0

 * Complete rewrite using React and the WordPress REST API.
 * Added support for block themes (the core Comments block).
 * New React settings page under _Comments  Lazy Load_.
 * Settings for load method, minimum comment count, button text, button style and
   loader visibility.
 * Per-post cache of the rendered comments block, with a “Clear comments cache” 
   action in the settings.
 * Crawlers receive the inline comments by default so SEO is preserved.
 * Removed the dependency on jQuery.
 * Existing v1.x load-method setting is migrated automatically on upgrade.

#### 1.0.10

 * Added compatibility for the Divi theme builder.

## Meta

 *  Version **2.1.0**
 *  Senest opdateret **2 dage siden**
 *  Aktive installationer **2.000+**
 *  WordPress-version ** 6.0 eller højere **
 *  Testet op til **7.1.1**
 *  PHP-version ** 7.4 eller højere **
 *  Sprog
 * [Dutch](https://nl.wordpress.org/plugins/lazy-load-for-comments/), [English (US)](https://wordpress.org/plugins/lazy-load-for-comments/),
   [Malayalam](https://ml.wordpress.org/plugins/lazy-load-for-comments/), [Persian](https://fa.wordpress.org/plugins/lazy-load-for-comments/),
   [Russian](https://ru.wordpress.org/plugins/lazy-load-for-comments/), [Spanish (Chile)](https://cl.wordpress.org/plugins/lazy-load-for-comments/)
   og [Spanish (Spain)](https://es.wordpress.org/plugins/lazy-load-for-comments/).
 *  [Oversæt til dit sprog](https://translate.wordpress.org/projects/wp-plugins/lazy-load-for-comments)
 * Tags
 * [comments](https://da.wordpress.org/plugins/tags/comments/)[lazy load](https://da.wordpress.org/plugins/tags/lazy-load/)
   [Page Speed](https://da.wordpress.org/plugins/tags/page-speed/)[performance](https://da.wordpress.org/plugins/tags/performance/)
 *  [Avanceret visning](https://da.wordpress.org/plugins/lazy-load-for-comments/advanced/)

## Bedømmelser

 4.7 ud af 5 stjerner.

 *  [  24 5-stjernet anmeldelser     ](https://wordpress.org/support/plugin/lazy-load-for-comments/reviews/?filter=5)
 *  [  1 4-stjernet anmeldelse     ](https://wordpress.org/support/plugin/lazy-load-for-comments/reviews/?filter=4)
 *  [  1 3-stjernet anmeldelse     ](https://wordpress.org/support/plugin/lazy-load-for-comments/reviews/?filter=3)
 *  [  2 2-stjernet anmeldelser     ](https://wordpress.org/support/plugin/lazy-load-for-comments/reviews/?filter=2)
 *  [  0 1-stjernet anmeldelser     ](https://wordpress.org/support/plugin/lazy-load-for-comments/reviews/?filter=1)

[Din anmeldelse](https://wordpress.org/support/plugin/lazy-load-for-comments/reviews/#new-post)

[Se alle anmeldelser](https://wordpress.org/support/plugin/lazy-load-for-comments/reviews/)

## Bidragsydere

 *   [ Joel James ](https://profiles.wordpress.org/joelcj91/)
 *   [ Foxe Labs ](https://profiles.wordpress.org/foxelabs/)

## Support

Problemerne er løst inden for de sidste to måneder:

     0 ud af 1

 [Vis supportforum](https://wordpress.org/support/plugin/lazy-load-for-comments/)

## Donér

Vil du gerne støtte udviklingen af dette plugin?

 [ Donér til dette plugin ](https://paypal.me/JoelCJ)