Recently, Blogger changed this attitude and now the blog administrator can change on a page by page basis the option to show or not the comment box. Be aware that if you have Disqus and you enable comments on static pages, you will end up having the native blogger interface for comment posting. This is a "feature" - it is too easy to fix to be called a bug! - of the way the Disqus script is working. In fact, the script is checking if the visitor is browsing the front page or a specific article, that in the Blogger nomenclature is called 'item'. A static page is not an item and definitely not the index page and so Disqus script doesn't know what to do and it does nothing allowing the native interface to show up.
To cure this lack, you just need to teach the Disqus widget to take care of pages as well as posts. Here is what you need to do.
- Go to the administration page of your blog, and select the Design tab. You see this in the picture here on the right.
- Do a full backup of your template because it is always better to be safe than sorry.
- Click on Edit HTML and confirm you are aware of what you are about to do.
- Remember to check the "Expand widget" option and search for the word "disqus". You should get to the Disqus widget that you need to modify adding the highlighted lines in the code snippet here below.
<b:widget id='HTML3' locked='false' mobile='yes' title='Disqus for unico-lab' type='HTML'> <b:if cond='data:blog.pageType == "static_page"'> <b:includable id='main'> <script type='text/javascript'> var disqus_shortname = 'unico-lab'; var disqus_blogger_current_url = '<data:blog.url/>'; </script> <b:if cond='data:blog.pageType == "item"'> <style type='text/css'> #comments {display:none;} </style> <script type='text/javascript'> (function() { var bloggerjs = document.createElement('script'); bloggerjs.type = 'text/javascript'; bloggerjs.async = true; bloggerjs.src = 'http://'+disqus_shortname+'.disqus.com/blogger_item.js'; (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(bloggerjs); })(); </script> </b:if> <b:if cond='data:blog.pageType == "static_page"'> <style type='text/css'> #comments {display:none;} </style> <script type='text/javascript'> (function() { var bloggerjs = document.createElement('script'); bloggerjs.type = 'text/javascript'; bloggerjs.async = true; bloggerjs.src = 'http://'+disqus_shortname+'.disqus.com/blogger_item.js'; (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[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('script'); bloggerjs.type = 'text/javascript'; bloggerjs.async = true; bloggerjs.src = 'http://'+disqus_shortname+'.disqus.com/blogger_index.js'; (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(bloggerjs); })(); </script> </b:includable> </b:widget>
Do not copy/past everything, but just the highlighted part, otherwise you will be using unico-lab.discus.com instead of your account!
- Save the template.
- Now, edit your static pages and click on the gear wheel on the right column to see the option and allow comments, if it was disabled. Re-publish your page and that's all
*Thanks so much* for this fix! Works like a charm. I've been looking for the answer "forever" ヅ
RispondiEliminavery glad it worked! Let's hope disqus developers will soon update their script including this anf the other hack we did to enable threads on mobile templates
RispondiEliminahttp://unico-lab.blogspot.com/2012/01/how-to-make-blogger-mobile-working-with.html
http://www.myfirmament.com/?IDG=16
RispondiElimina*Thanks so much* for this fix! Performs like a appeal. I've been looking for the response "forever" ヅ
RispondiEliminaSpybubble Gratis