--> How To Manually Add Disqus Comment Widget to Blogger? | Experience Lab - Online business creation and development guide for bloggers and startups

How To Manually Add Disqus Comment Widget to Blogger?

In a previous post, we talked about integrating Disqus comments in a Blogger blog . That is just one of the ways to add this commenting s...

Disqus
In a previous post, we talked about integrating Disqus comments in a Blogger blog. That is just one of the ways to add this commenting system to your blog. If you're the geeky type, you'd want to do it manually, just so you know you can control it and customize it to your liking. It can also come in useful when the Disqus gadget installer isn't working. So today, we'll look at a manual way of installing the Disqus commenting system on your blogger blog.

Note that this method requires you to edit your blog's template HTML, so it is advisable to back up your template before continuing. Also, this method won't work on Blogger Dynamic Views templates.

Adding Disqus comments manually

  • From your Blogger dashboard, go to Layout, and then click on Add a gadget in the sidebar
  • Select the HTML/JavaScript widget from the list
Add a widget
  • Enter Disqus as the title and the following in the content;
<!-- Disqus comments gadget -->
We've added a new widget. It is time to tweak it a bit.
  • Now go to the Template section, and go into the Edit HTML mode
  • Find the widget you just created by searching for 'Disqus'. You should see something like this;
<b:widget id='HTML1' locked='false' title='Disqus' type='HTML'>
  • Add a mobile='yes' key-value pair in that line. It will now look like this;
<b:widget mobile='yes' id='HTML1' locked='false' title='Disqus' type='HTML'>
  • Now delete the following code before the closing widget tag...
<b:includable id='main'>
  <!-- only display title if it's non-empty -->
  <b:if cond='data:title != &quot;&quot;'>
    <h2 class='title'><data:title/></h2>
  </b:if>
  <div class='widget-content'>
    <data:content/>
  </div>
  <b:include name='quickedit'/>
</b:includable>
  • ...and replace it with the following code;
<b:includable id='main'>
            <script type='text/javascript'>
                var disqus_shortname = &#39;CHANGETHIS&#39;;
                var disqus_blogger_current_url = &quot;<data:blog.canonicalUrl/>&quot;;
                if (!disqus_blogger_current_url.length) {
                    disqus_blogger_current_url = &quot;<data:blog.url/>&quot;;
                }
                var disqus_blogger_homepage_url = &quot;<data:blog.homepageUrl/>&quot;;
                var disqus_blogger_canonical_homepage_url = &quot;<data:blog.canonicalHomepageUrl/>&quot;;
            </script>
            <b:if cond='data:blog.pageType == &quot;item&quot;'>
                <style type='text/css'>
                    #comments {display:none;}
                </style>
                <script type='text/javascript'>
                    (function() {
                        var bloggerjs = document.createElement(&#39;script&#39;);
                        bloggerjs.type = &#39;text/javascript&#39;;
                        bloggerjs.async = true;
                        bloggerjs.src = &#39;//&#39;+disqus_shortname+&#39;.disqus.com/blogger_item.js&#39;;
                        (document.getElementsByTagName(&#39;head&#39;)[0] || document.getElementsByTagName(&#39;body&#39;)[0]).appendChild(bloggerjs);
                    })();
                </script>
            </b:if>
                <style type='text/css'>
                    .post-comment-link { visibility: hidden; }
                </style>
                <script type='text/javascript'>
                (function() {
                    var bloggerjs = document.createElement(&#39;script&#39;);
                    bloggerjs.type = &#39;text/javascript&#39;;
                    bloggerjs.async = true;
                    bloggerjs.src = &#39;http://&#39;+disqus_shortname+&#39;.disqus.com/blogger_index.js&#39;;
                    (document.getElementsByTagName(&#39;head&#39;)[0] || document.getElementsByTagName(&#39;body&#39;)[0]).appendChild(bloggerjs);
                })();
            </script>
</b:includable>
  • In the code above, change the text CHANGETHIS to your own forum shortname, e.g. MyBloggerTricks.
You now have Disqus installed on your Blogger blog! You can now the widget to you liking!


COMMENTS

Name

Affiliate Marketing,12,Announcement,34,Bing,9,Bitcoin,38,blog,7,Blogger Resources,42,Blogger Templates,4,blogger tricks,156,Blogging ethics,70,Blogging tips,198,Bugs and Errors,34,Business,9,Copyright Violation,9,CSS and HTMLTricks,95,Designs,8,drop down menu,7,eBook,12,Email Marketing,7,Events,30,Facebook,30,Facebook tricks,49,Google,157,Google AdSense,42,Google Analytics,7,Google Plus,51,Google Plus Tricks,38,Guest Posts,112,home,2,How To,77,Internet,1,JSON Feeds,25,Kitchen Recipes,2,Label Based Sitemap Themes,1,Make Money Online,108,Marketing,16,MBT Blogger Templates,7,Menus,1,News,146,Pages,1,Posts,10,presentations,15,Responsive,10,Reviews,7,SEO,307,Settings,6,Shortcode,15,Sitemap Themes,1,Social Media,155,Technology,7,Templates,1,Tips,2,Tools,1,Traffic Tips,80,Video,19,Web Designing,62,web hosting,18,Webmaster Tools,97,Widgets,199,wordpress,26,
ltr
item
Experience Lab - Online business creation and development guide for bloggers and startups: How To Manually Add Disqus Comment Widget to Blogger?
How To Manually Add Disqus Comment Widget to Blogger?
https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhuRQirnhQf5Lsi2fbL1E1rqgilZ-Lk_2NK5dQlmV-Nbicn-ZCFAysFmF-6V0evrXA0uUbXJj4UUmCF410daDz0JH1JX2hn-mmG43e_bEDNO2iK6WCYhnAoIp74zv-VWPSFqSUNMf8gis0l/s1600/disqus.jpg
https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhuRQirnhQf5Lsi2fbL1E1rqgilZ-Lk_2NK5dQlmV-Nbicn-ZCFAysFmF-6V0evrXA0uUbXJj4UUmCF410daDz0JH1JX2hn-mmG43e_bEDNO2iK6WCYhnAoIp74zv-VWPSFqSUNMf8gis0l/s72-c/disqus.jpg
Experience Lab - Online business creation and development guide for bloggers and startups
https://www.experiencelab.info/2014/12/how-to-manually-add-disqus-comment.html
https://www.experiencelab.info/
https://www.experiencelab.info/
https://www.experiencelab.info/2014/12/how-to-manually-add-disqus-comment.html
true
2959477579779989044
UTF-8
Loaded All Posts Not found any posts VIEW ALL Readmore Reply Cancel reply Delete By Home PAGES POSTS View All RECOMMENDED FOR YOU LABEL ARCHIVE SEARCH ALL POSTS Not found any post match with your request Back Home Sunday Monday Tuesday Wednesday Thursday Friday Saturday Sun Mon Tue Wed Thu Fri Sat January February March April May June July August September October November December Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec just now 1 minute ago $$1$$ minutes ago 1 hour ago $$1$$ hours ago Yesterday $$1$$ days ago $$1$$ weeks ago more than 5 weeks ago Followers Follow THIS PREMIUM CONTENT IS LOCKED STEP 1: Share. STEP 2: Click the link you shared to unlock Copy All Code Select All Code All codes were copied to your clipboard Can not copy the codes / texts, please press [CTRL]+[C] (or CMD+C with Mac) to copy