WordPress's own Recent Comments widget can't see Disqus comments. The Latest Comments Widget add-on 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, entered on the Comment sync page.
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 version 11'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 version 11 stay where they are. Version 11 had one set of widget settings for the whole site; each widget now has its own. Until you save a widget, it uses your version 11 settings, so nothing changes. The old on/off switch is gone: the add-on being active is the switch.
The widget is also much lighter than version 11'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 add-on 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, entered on the Comment sync page.
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 version 11'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 version 11
Widgets you placed with version 11 stay where they are. Version 11 had one set of widget settings for the whole site; each widget now has its own. Until you save a widget, it uses your version 11 settings, so nothing changes. The old on/off switch is gone: the add-on being active is the switch.
The widget is also much lighter than version 11's, which made one extra API request for every comment it showed.
Related