How To Add Disqus Recent Comments Widget

Read {count} times since 2020

In the last post, I told the way to implement Disqus Combination widget to your web site which have recent comments, popular threads and commented users, all in one. But, if you only need one of it, why load all 3 of them. So, if you only want the Recent Comments widget, you will find this post useful.


Disqus Recent Comments Widget

Disqus Recent Comments Widget

You can also see a demo on JsFiddle.

The Code

Insert the following code in the place where you want to display the widget :

<div id="RecentComments" class="dsq-widget">
 <h2>Recent Comments</h2>
 <script type="text/javascript" src=""></script>

You should replace the "" with your Disqus forum URL ( "" ).


As I said in my previous post, this widget also supports configuration like the "Combination Widget".

Name Default Value Description
num_items 5 The number of items that should be shown (includes all items).
hide_mods Set To "1" to hide Moderators’ comments
excerpt_length 100 The excerpt (short version of comment) length
hide_avatars Set to "1" if you don’t want to display avatars
avatar_size 32 The Size of the avatar of user.

You can add this code in Blogger, WordPress and any other Blogging services.


Go to your Blogger Blog -> Layout and click on the "Add a Gadget" button. Choose "HTML/JavaScript" widget :

Add HTML/Javascript Widget In Blogger

Add HTML/Javascript Widget In Blogger

Then, paste the code and click "Save" button.

Show Comments