How to Put Disqus Comment Valid HTML5 Blogger
Updated on April 07, 2016
If you're searching on Google with the keywords how to install Disqus comments on blogger , of course, already scattered tutorial-tutorial. But if now we are using the tutorials that there will be a validation error HTML5 because it contains css style in the widget.
For that now I will share how post comments Disqus valid HTML5 in Blogger. Actually it also is to improve Disqus installation in Blogger tricks that I previously shared with lazy loading Disqus comments by using the Disqus code for the website (not for Blogger)
Author: Adhy Suriady
With these tricks is loading the blog becomes lighter, but it turns out the comments already exist and appear on the desktop did not appear in the mobile unless the comment is written or written with a mobile device (but the trick is running on wordpress).
Apparently it so Disqus comments also appear on mobile devices then for Bloggers should use Disqus script that was to Blogger. But as I said above, if we follow the steps adding comments Disqus like in Disqus to add a widget in the sidebar Blogger, then we will get an error validation HTML5 and passable accounted loding blogs for storage javascript and css in a sidebar widget which should be installed in the Edit HTML.
If you want to try to trick me this, please follow the steps below.
I assume you've made a Disqus account, if not please create here https://disqus.com/websites/
After successfully register and log in Disqus, please click the gear icon ( settings ) in the upper right corner and then click Add Disqus to Site and please use the data according to your blog. After completion of the new display will appear and click Universal Code and then copy this code var disqus_shortname = 'blahblahblah'; what we need is a username Disqus his ( blahblahblah )
Then please go to Blogger and Edit HTML. Copy the code below
For that now I will share how post comments Disqus valid HTML5 in Blogger. Actually it also is to improve Disqus installation in Blogger tricks that I previously shared with lazy loading Disqus comments by using the Disqus code for the website (not for Blogger)
Author: Adhy Suriady
With these tricks is loading the blog becomes lighter, but it turns out the comments already exist and appear on the desktop did not appear in the mobile unless the comment is written or written with a mobile device (but the trick is running on wordpress).
Apparently it so Disqus comments also appear on mobile devices then for Bloggers should use Disqus script that was to Blogger. But as I said above, if we follow the steps adding comments Disqus like in Disqus to add a widget in the sidebar Blogger, then we will get an error validation HTML5 and passable accounted loding blogs for storage javascript and css in a sidebar widget which should be installed in the Edit HTML.
If you want to try to trick me this, please follow the steps below.
I assume you've made a Disqus account, if not please create here https://disqus.com/websites/
After successfully register and log in Disqus, please click the gear icon ( settings ) in the upper right corner and then click Add Disqus to Site and please use the data according to your blog. After completion of the new display will appear and click Universal Code and then copy this code var disqus_shortname = 'blahblahblah'; what we need is a username Disqus his ( blahblahblah )
Then please go to Blogger and Edit HTML. Copy the code below
<script type='text/javascript'>
var disqus_shortname = "kompiajaib";
var disqus_blogger_current_url = "<data:blog.canonicalUrl/>";
if (!disqus_blogger_current_url.length) {
disqus_blogger_current_url = "<data:blog.url/>";
}
var disqus_blogger_homepage_url = "<data:blog.homepageUrl/>";
var disqus_blogger_canonical_homepage_url = "<data:blog.canonicalHomepageUrl/>";
(function() {
var bloggerjs = document.createElement("script");
bloggerjs.type = "text/javascript";
bloggerjs.async = true;
bloggerjs.src = "//"+disqus_shortname+".disqus.com/blogger_item.js";
(document.getElementsByTagName("head")[0] || document.getElementsByTagName("body")[0]).appendChild(bloggerjs);
})();
(function() {
var bloggerjs = document.createElement("script");
bloggerjs.type = "text/javascript";
bloggerjs.async = true;
bloggerjs.src = "//"+disqus_shortname+".disqus.com/blogger_index.js";
(document.getElementsByTagName("head")[0] || document.getElementsByTagName("body")[0]).appendChild(bloggerjs);
})();
</script>
Change the code kompiajaib by Disqus username of your blog that you had previously copied (blahblahblah).
Then please paste the above code right below the following code:
<b:includable id='comments' var='post'>
<div class='comments' id='comments'>
After that add css code below the above code ]]></b:skin> or </style>
#comments {display:none;}
.post-comment-link { visibility: hidden; }
Then go to your Blogger Dashboard and then Settings. In bagianComments fox comments Who can? become Anyone.
Done ... please save your template and try to open one of its news pages.
Or you can try to install Disqus comments with other alternative mounting Disqus comments
HERE.