Home » Blogger tips » How to Install Disqus Comments Universal Code in Blogger Below Post?

How to Install Disqus Comments Universal Code in Blogger Below Post?

Here is the step by step guide to install the Disqus comments universal code in Blogger, below post content.

Steps to Install Disqus Comments Universal Code to Blogger (Below Post)

  1. First, get the universal code from Disqus for your website and convert the code for compatibility for the blogger using the following link Code converter or copy the below code by changing the shortcode with your website shortcode (yoursiteshortcode). Also please notice that I have already changed the page URL and page identifier variables for blogger by uncommenting that part.
<div id="disqus_thread"></div>
<script>

/**
* RECOMMENDED CONFIGURATION VARIABLES: EDIT AND UNCOMMENT THE SECTION BELOW TO INSERT DYNAMIC VALUES FROM YOUR PLATFORM OR CMS.
* LEARN WHY DEFINING THESE VARIABLES IS IMPORTANT: https://disqus.com/admin/universalcode/#configuration-variables*/

var disqus_config = function () {
this.page.url = &quot;<data:blog.url/>&quot; // Replace PAGE_URL with your page&#39;s canonical URL variable
this.page.identifier = &quot;<data:post.id/>&quot; // Replace PAGE_IDENTIFIER with your page&#39;s unique identifier variable
};

(function() { // DON&#39;T EDIT BELOW THIS LINE
var d = document, s = d.createElement(&#39;script&#39;);
s.src = &#39;https://yoursiteshortcode.disqus.com/embed.js&#39;;
s.setAttribute(&#39;data-timestamp&#39;, +new Date());
(d.head || d.body).appendChild(s);
})();
&lt;/script&gt;
&lt;noscript&gt;Please enable JavaScript to view the &lt;a href=&quot;https://disqus.com/?ref_noscript&quot;&gt;comments powered by Disqus.&lt;/a&gt;&lt;/noscript&gt;
  1. Then in Blogger, click on the Theme tab, then click on the Edit HTML button to edit HTML.
  2. Find the following code <data:post.body/> and after the second occurrence of this code, paste the above code just below this (<data:post.body/>) code.
  3. Then find the /body tag and paste the following code above that /body tag.
<script id="dsq-count-scr" src="//yoursiteshortcode.disqus.com/count.js" async></script>
  1. Save the changes now, and the Disqus comments system will display below the post in blogger something like below.

Add discus comments below the post in Blogger