WordPress's own Recent Comments widget can't see Disqus comments. The Latest Comments Widget addon adds a Disqus Latest Comments widget that lists them: who commented, a short excerpt, and a link straight to the comment.
The widget hides itself when it can't get comments — usually because the public API key is missing. Logged-in administrators see a note in its place explaining why; visitors see nothing.
A site with no comments yet shows "No comments yet."
The widget's small stylesheet loads only while the widget is in use. The list keeps DCL Pro's class names — dcl-latest-comments-widget, dcl-latest-comments-item, dcl-latest-comments-author and so on — so custom CSS carries over.
Widgets you placed with DCL Pro 11.x stay where they are. DCL Pro had one set of widget settings for the whole site; each widget now has its own. Until you save a widget, it uses your DCL Pro settings, so nothing changes. DCL Pro's on/off switch is gone: the addon being active is the switch.
The widget is also much lighter than DCL Pro's, which made one extra API request for every comment it showed.
Latest Comments Widget
WordPress's own Recent Comments widget can't see Disqus comments. The Latest Comments Widget addon adds a Disqus Latest Comments widget that lists them: who commented, a short excerpt, and a link straight to the comment.
It needs your Disqus public API key.
Adding the widget
You can add it more than once, with different settings.
Settings
Each widget has its own settings.
Each comment shows the author, the excerpt, the post it was left on and the date. The post title links to the comment itself.
Deleted, spam and unapproved comments are never listed.
Caching
The widget never slows your pages with API requests:
The Disqus API allows 1,000 requests an hour per key, shared with everything else using the key. At one request per 5 minutes the widget uses 12.
When the widget is empty
The widget hides itself when it can't get comments — usually because the public API key is missing. Logged-in administrators see a note in its place explaining why; visitors see nothing.
A site with no comments yet shows "No comments yet."
Styling
The widget's small stylesheet loads only while the widget is in use. The list keeps DCL Pro's class names —
dcl-latest-comments-widget,dcl-latest-comments-item,dcl-latest-comments-authorand so on — so custom CSS carries over.The accent colour is one custom property:
Block themes
Block themes have no widget areas, so the widget can't be placed there.
Developer hooks
dcl_latest_comments_cache_timeHow long the list is cached, in seconds. Default
300; the minimum is60.Coming from DCL Pro
Widgets you placed with DCL Pro 11.x stay where they are. DCL Pro had one set of widget settings for the whole site; each widget now has its own. Until you save a widget, it uses your DCL Pro settings, so nothing changes. DCL Pro's on/off switch is gone: the addon being active is the switch.
The widget is also much lighter than DCL Pro's, which made one extra API request for every comment it showed.
Related