Many Disqus Modules On A Single Page

Posted by Weston Ganger

For many SPA’s or AJAX sites loading multiple disqus modules per page can be a pain.

You can only show one disqus module at a time. So you must use a button or something that shows and hides on click.

var disqus_shortname = 'disqusShortname';
var disqus_identifier = 'disqusIdentifier';
var disqus_title = 'postTitle';
var disqus_url = '';

if(typeof(DISQUS) === 'undefined'){
  (function() {
    var dsq = document.createElement('script');
    dsq.type = 'text/javascript';
    dsq.async = true;
    dsq.src = '//' + disqus_shortname + '';
    (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
} else {
    reload: true,
    config: function() { = disqus_url; = disqus_url; = disqus_title;

Related External Links:

Article Topic:Software Development - Javascript

Date:September 05, 2015

Recommended Posts



Send Me A Message

I would love to get in touch and talk about your next project. Feel free to send a message and I will get back to you shortly.

Get Connected