Using Disqus with Blogger mobile templates

The previous post was linked off of the penaddict.com blog yesterday and  as a result I realized I had a problem with commenting on my blog when you visit it on a mobile device. I use Disqus instead of the default Blogger comment system. It integrates nicely into blogger, and is installed by just adding a widget. The code behind the widget hides the blogger comment form, and and the Disqus one. It has worked great until yesterday.

Blogger made the mobile templates available to users a few months ago when they rolled out a bunch of other features. At first I selected the "simple" design. I visited the site on my iPhone and the Disqus comment system worked fine. Recently I messed around with the mobile template and changed it to the "custom" one that better matches with the full version of the blog. I didn't even think to check, but this somehow broke Disqus on the mobile version.

I was digging around yesterday and found out how to fix it. The widget tag in blogger has an attribute for whether to display it on the mobile version or not. You simple add the the text "mobile='yes'" to the widget tag and you should be good to go. It worked for me anyway.

Go in and edit your HTML and check "Expand Widget Templates". Add the text and there you go.

Easy as that. Apparently when I changed to the custom mobile template it changed the mobile attribute somehow. I'm not exactly sure what happened, but it is working fine now.


Disqus allows you to sync comments so when somebody leaves a comment via Disqus it automatically copies it into the Blogger comment system as well. This is nice in case you even want to stop using Disqus. You will still have all your comments. However, it doesn't seem to sync in the other direction. I had a couple people leave comments in the mobile version of the site and it seems like they are stuck there. I can't get them to copy to Disqus. Therefore, they are not displaying on my blog at all now. A minor inconvenience, but I'm glad I got it fixed.