Adding Disqus Comment & Showing Comment Counts

Disqus comment system is a very robust comment platform for any website.  With its awesome features anyone can build an active community, letting people to comment using their facebook, yahoo, twitter identity or just as anonymous user, comments become more like live discussions with realtime posting and updating. Disqus can be integrated on any kind of website using the their JavaScript embed code. To be able to use Disqus Comment system, you need to register your site with Disqus, and you will need some knowledge of editing HTML templates or themes.

Installing Disqus Comment

  1. First thing is to register at Disqus, add your site details and Once you are finished, you will be provided with your site's shortname.
  2. Copy & Paste following code in your template anywhere you want Disqus comment system to appear, in my case, I would probably paste it just below article. and replace XXXXX with your website shortname [cc lang="js"]
    comments powered by Disqus [/cc]

Showing Disqus Comments Count

  1. Copy Javascript code, just before </body> tag, on a page which will display the comment counts. Replace XXXXX with your site's shortname. [cc lang="js"] [/cc]
  2. And when you want to display comment counts, just point link to pages where Disqus comments are installed, with #disqus_thread added on your links. Suppose my Disqus comment is located in https://www.sanwebe.com/2012/05/robert-moog-google-doodle page, I would add #disqus_thread after the link, example URL: [cc lang="html"] article [/cc]

Conclusion

Disqus recommends if your site is very large and comments are installed in almost every page, then you should be using Disqus identifier. Disqus uses this identifier to determine the appropriate comment thread to load. If the appropriate thread could not be found, a new thread is created. Disqus identifiers keep threads and pages associated. To use Disqus identifier in your URL, just create a new attribute called data-disqus-identifier and in value write unique identifier of the page. Something like this : [cc lang="html"]article[/cc]
New question is currently disabled!