Wednesday, July 9, 2008

How to make comment form appear under your post in Blogger

An embedded under your post comment form is a new cool and long anticipated feature of Blogger. It minimizes the effort needed to leave a reply in your blog, thus raising the chance your blog visitors will leave their opinion.

All of the Blogger standard templates got updated with the new embedded comment form code, though the feature is still considered 'in draft', and you will have to login into 'Blogger in Draft' version of blog control UI to enable it.

To enable embedded under your post comment form in Blogger:

  1. Go to blogger in draft dashboard
  2. Optionally check the Make Blogger in Draft my default dashboard checkbox in the upper right corner if you want to always stay on bleeding-edge front of Blogger features.
  3. Press the 'Settings' link under your blog name
  4. Choose Comments tab
  5. Select 'Embedded below post' radiobutton option for Comment Form Placement setting.comment form embedded under post setting radiobutton manual
  6. Press the Save Settings button in the bottom of the page.

Now, if you use a standard Blogger template, all your post pages should receive a fancy embedded inline comment form.
In case you, just like me, use a custom template, you might need to update the template manually:
  1. Open Dashboard->Layout->Edit HTML
  2. Click Expand Widget Templates checkbox
  3. Find the following lines:<p class='comment-footer'>
    <b:if cond='data:post.allowComments'>
    <a expr:href='data:post.addCommentUrl' expr:onclick='data:post.addCommentOnclick'>
    <data:postCommentMsg/>
    </a>
    </b:if>
    </p>
  4. Replace it with the following:<p class='comment-footer'>
    <b:if cond='data:post.embedCommentForm'>
    <b:include data='post' name='comment-form'/>
    <b:else/>
    <b:if cond='data:post.allowComments'>
    <a expr:href='data:post.addCommentUrl' expr:onclick='data:post.addCommentOnclick'>
    <data:postCommentMsg/>
    </a>
    </b:if>
    </b:if>
    </p>
  5. Save the template.

Done. Feel free to experiment later with the template code of comment-form widget :)
Meanwhile, enjoy :)
0
said thank you for this page

Liked this article? Bookmark/share it with others: Didn't like the article, found a mistake or just want to express your own opinion? Post a comment!

11 comments:

Cranked said...

Thanks for testing, Neeraj :)

Anonymous said...

hello, this is just another try.

Mike said...

nice post! thanks for sharing..

Ashleigh said...

I've tried these same codes from others and keep getting duplicate comment boxes below the post.

I'm sure it's in my code some where.

Help! ;)

Cranked said...

Ashleigh, I've checked your blog and it seems that you have commenting option set to a pop-up window at the moment. Go to your blog Settings->Comments and choose Embedded below post value for Comment Form Placement option. Then check if it works.
If you still receive duplicate comment boxes - you can e-mail me your template and I'll fix it for you.

/Gary

disney world said...

very nice post here exactly what i need

Web Design Quote said...

Thanks for the information about the blogger comments. Hopefully this post will be helpful for the visitors.

Vivi said...

i cant find these lines in my code..
nothing similar either..

motoculteur said...

i enjoyed viewing your post i will definitely add this to my blog and bookmark it

Post a Comment

Have anything to say? Leave a comment!
Too shy or got a too private question? Email me
Alternatively, you can drop me a line on Twitter