Linux 软件免费装
Banner图

Lazy Load for Comments

开发者 joelcj91
duckdev
foxelabs
更新时间 2026年8月22日 15:14
捐献地址: 去捐款
PHP版本: 7.4 及以上
WordPress版本: 7.1
版权: GPLv2 or later
版权网址: 版权信息

标签

performance comments lazy load page speed lazyload comments

下载

1.0.0.1 1.0.10 1.0.2 1.0.3 1.0.4 1.0.5 1.0.7 1.0.8 1.0.9 1.0.0 2.0.1 1.0.6 2.0.0 2.1.0

详情介绍:

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

安装:

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.

屏幕截图:

  • Load button settings.
  • Cache management.

升级注意事项:

2.0.1 Fixes comments not displaying on Genesis and other classic themes that depend on comments_template() populating comments_by_type. 2.0.0 Major rewrite with React, REST API and block theme support. Your existing load-method setting is migrated automatically — no manual steps required.

常见问题:

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 covers most setups. For everything else, the free WordPress.org support forum is the best place to start.

更新日志:

2.0.1 2.0.0 1.0.10