Alex Lindgren in Technology 2 minute read

Adding Disqus Comment Counts To Webpages

Disqus is a great way to add comments to a site. I like it because it is free, easy to integrate, and easy for commenters to use (supports logging in with different accounts including Facebook, Twitter and Google). It also helps with page load speed since it loads from a third party system after most of the page is already loaded. They also have a great API for developers.

In the past I've used the Disqus API to retrieve the number of comments for blog posts to display the count next to the headline. When I went to implement that for this site, I was happy to discover that Disqus has made it very simple to do this. Their help article Adding comment count links to your home page describes how to do this in detail, but simply you just need to add a snippet of Javascript to the bottom of your page and it will update the text of any link to disqus comments with the count.