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

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...

Introducing Gadgetsforblogger.Com - A Searchable Directory Of Gadgets For Blogger

Gadget directory , I've been keeping track of new submissions and developing several gadgets of my own . While Blogger's directory is searchable, I realised that many bloggers would find descriptive reviews, screenshots, developer details and installation instructions a useful addition to the brief descriptions offered in the directory listings. So I decided to create Gadgets for Blogger - a searchable directory of gadgets which have been developed specifically for the Blogger platform. Each gadget listed in this directory features: The gadget title A full description of the gadget Screenshot of the gadget in action Details of ads included in the gadget (where applicable) Contact/website details of the gadget developer (where possible)  Quick install link, to add the gadget to your blog without having to navigate to your Blogger dashboard and through various menus to locate the installation link. All gadgets listed on Gadgets for Blogger have been tested first, t...

16 Useful Twitter Tools For Blogger

Since it's launch back in 2006, Twitter has become a leading pioneer in the world of social media. Bloggers in particular find this service an invaluable tool for syndication, news stories and community conversation. For this post, I have rounded up 16 of the most useful tools, tips and free resources to help you get the most out of Twitter through your Blogger powered blog. Display your Latest Tweets Visitors to your blog may also enjoy reading your Tweets, particularly if they are of relevance to your blog's niche subject. Here is a selection of the best tools for displaying Twitter updates in your Blogger layout: The Official Twitter Badges Twitter provides an animated "Profile" badge which you can use to display your latest updates as a widget in your blog layout: You can configure the size, colours and number of updates for your badge in the settings, then grab the code which can be pasted in an HTML/JavaScript widget in your Blogger layout page. Ano...