How to display your websites latest Disqus comments on a page or post

Disqus provides a JavaScript widget – recent_comments_widget.js – that allows you to list your websites latest Disqus comments. The widget can be embedded on your website and outputs the latest comments as HTML. The best part is it’s dead simple to use and doesn’t require any complicated configuration or an API key.

WordPress-DisqusLatestComments1

Simply copy the code below and past into the post or page – making sure to use the ‘Text’ tab (not the ‘Visual’ tab)  and replace disqusshortname with the short name for your account.

WordPress-NonBreakingSpace1

You can also change other variables as required.

<script type="text/javascript" src="http://disqusshortname.disqus.com/recent_comments_widget.js?num_items=10&hide_avatars=0&avatar_size=40&excerpt_length=100"></script>

Alternatively you can install the Disqus last comments addon plugin that uses this widget but makes it easier to configure and insert in your post or page.

You can find the plugin on the WordPress plugin directory.