Langsung ke konten utama

Adding Threaded Comments To A Customized Blog (Updating My Blogger Template)

Since deciding to update my Blogger template, one of the features I've been most looking forward to using is threaded comments. This enables us to reply directly in response to comments left on a post.

After diving into reams of code and going a very long way about updating my template to include this feature, I stumbled across a very simple way to add this functionality to older Blogger templates.

To help anyone else using a custom Blogger template include threaded comments for their site, I've written this quick tutorial which (unlike my original method!) should get you up and running with comment replies in no time!



Ensure your blog meets the requirements for threaded comments to be displayed

There are two main settings you should change if you would like to display threaded comments in your Blogger site:
  1. Ensure your blog feeds are set to "Full" in Settings>Other
  2. Choose to "embed" your comment form below your post in Settings>Posts and Comments
Once you have saved these settings, it's time to check your Blogger template's HTML code.

Add the required code to your Blogger template

Next, go to Template and click the Edit HTML button. On the warning page, choose to proceed, then make sure you have checked the "Expand Widget Templates" box.

Now search for the following line of code:

<b:include data='post' name='comments'/>

If your template does not include this line of code, chances are you're already using an updated Blogger template and do not need to proceed any further.

If you do find the above line of code, replace it with the following:

<b:if cond='data:post.showThreadedComments'>
  <b:include data='post' name='threaded_comments'/>
<b:else/>
  <b:include data='post' name='comments'/>
</b:if>

Preview your template to ensure you haven't made any mistakes in pasting the code, and if all is well, save your template.

Now when you view a post's comments section, you should see a "Reply" link beneath any existing comments. When you reply to a comment, a comment form will appear under the comment you are responding to, and your responses will appear beneath.

Thanks to this post on the Blogger Developers Site for the simplified explanation!


Did you find this post useful?


If you've used this tutorial to update your existing Blogger template, please let us know if you found it useful in the comments section below.

Blogger Icon by Double-J Designs

Komentar

Postingan populer dari blog ini

Free Blogger Backgrounds And Textures To Spice Up Your Site

Background images can instantly transform the appearance of our Blogger sites. Using the Blogger template designer, we can easily upload and configure a new background image in just a few clicks, while those using older templates need only add a few lines of code to achieve a dramatic effect. In this post, you'll find resources for hundreds of different free backgrounds, patterns and textures you can use to spice up your Blogger site, along with instructions for applying this simple but extensive effect. Large background images Large background images enable us to display a single large image behind the main content of our site, such as a photograph or complementary texture. Here is a selection of excellent resources for large background images and textures: HOT Bliggity Blog Provides a huge selection of large background images with a contrasting central panel to offer contrast for the main site content. Shabby Blogs A beautiful col...

Another Blog Is Already Hosted At This Address - How To Fix

When attempting to set up their Blogger custom domain, many Blogger users have received the following error message: Another blog is already hosted at this domain Although I have set up many custom domains to use with Blogger , until this weekend I had never experienced this issue for myself (and was unable to offer any definitive solution for those experiencing this problem). My friend was experiencing this very persoalan after setting up her new blog a few days ago. We have been able to find some solutions which I hope may help others who see this error message when attempting to set up their custom domain. Assuming you have already configured the DNS settings for your particular domain provider and have attempted to publish to a custom domain through your Blogger dashboard, here are the steps you should take: 1. Publish back to your Blog*Spot domain In order to make your blog accessible while troubleshooting your custom domain, it is advisable to publish back to your Blog*Spot...

Google Blogger For Dummies To Be Released In February!

If you're familiar with the "Dummies" series of books, you'll understand how helpful and insightful these textbooks can be in dealing with any subject. That being said, I'm happy to announce that Google Blogger for Dummies is due to hit bookshops on February 3rd. It's available to pre-order now from Amazon.com  (priced at $16.49) and will be available in Barnes and Noble, Waterstones and other bookshops, and also directly from Wiley. The author, Susan Gunelius, has been kind enough to send me a 60 page preview of this book, complete with a full and detailed table of contents and two sample chapters for my preliminary review. Also, when the book is released early next month, Susan has graciously offered me a copy of the book so that I can review it in it's entirety and offer readers my insights. What Google Blogger for Dummies will cover Being a "Dummies" guide, Google Blogger for Dummies will cover both the basics of using Blogger (crea...