bloggerdisqus

How to show same Disqus thread on different blogger pages?


on this page it says I can show the same comments thread on different pages based on the identifier.

The code as found on that page:

var disqus_config = function () {
    this.page.url = 'a unique URL for each page where Disqus is present';
    this.page.identifier = 'a unique identifier for each page where Disqus is present';
    this.page.title = 'a unique title for each page where Disqus is present';
};

(function() {  // REQUIRED CONFIGURATION VARIABLE: EDIT THE SHORTNAME BELOW
    var d = document, s = d.createElement('script');
    
    s.src = '//EXAMPLE.disqus.com/embed.js';  // IMPORTANT: Replace EXAMPLE with your forum shortname!
    
    s.setAttribute('data-timestamp', +new Date());
    (d.head || d.body).appendChild(s);
})();

My question is, on blogger, how can I do that? and how to find "this.page.identifier" for the comments thread I want to show on different pages?

I checked the similar topics here but did not find how to apply that on blogger.


Solution

  • I figured it out, on blogger and on your post/page just use post/page URL that of which you desire to show its comments in other place. insert that post/page URL into the following code, then put the code into your post/page body.

    Let's say you want to show the same comments thread of post A on page B. Then, take post A URL substitute it into the code and put the code on page B.

    <script>
        var disqus_config = function () {
            this.page.url = 'your post/page url ';
            this.page.identifier = 'your post/page URL ';
        };
    </script>
    

    at least that's what worked for me.